abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r1176214 - in /abdera/abdera2/common/src/main/java/org/apache/abdera2/common/security: ApiKey.java KeyBase.java
Date Tue, 27 Sep 2011 05:57:32 GMT
Author: jmsnell
Date: Tue Sep 27 05:57:32 2011
New Revision: 1176214

URL: http://svn.apache.org/viewvc?rev=1176214&view=rev
Log: (empty)

Modified:
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/security/ApiKey.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/security/KeyBase.java

Modified: abdera/abdera2/common/src/main/java/org/apache/abdera2/common/security/ApiKey.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/common/src/main/java/org/apache/abdera2/common/security/ApiKey.java?rev=1176214&r1=1176213&r2=1176214&view=diff
==============================================================================
--- abdera/abdera2/common/src/main/java/org/apache/abdera2/common/security/ApiKey.java (original)
+++ abdera/abdera2/common/src/main/java/org/apache/abdera2/common/security/ApiKey.java Tue
Sep 27 05:57:32 2011
@@ -1,5 +1,7 @@
 package org.apache.abdera2.common.security;
 
+import java.security.Key;
+
 import javax.crypto.spec.SecretKeySpec;
 
 import org.apache.commons.codec.binary.Base64;
@@ -18,15 +20,15 @@ public class ApiKey extends KeyBase {
     super(key, alg, size);
   }
 
-  public ApiKey(SecretKeySpec key, int size) {
+  public ApiKey(Key key, int size) {
     super(key, size);
   }
 
-  public ApiKey(SecretKeySpec key, String alg, int size) {
+  public ApiKey(Key key, String alg, int size) {
     super(key, alg, size);
   }
 
-  public ApiKey(SecretKeySpec key) {
+  public ApiKey(Key key) {
     super(key);
   }
 

Modified: abdera/abdera2/common/src/main/java/org/apache/abdera2/common/security/KeyBase.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/common/src/main/java/org/apache/abdera2/common/security/KeyBase.java?rev=1176214&r1=1176213&r2=1176214&view=diff
==============================================================================
--- abdera/abdera2/common/src/main/java/org/apache/abdera2/common/security/KeyBase.java (original)
+++ abdera/abdera2/common/src/main/java/org/apache/abdera2/common/security/KeyBase.java Tue
Sep 27 05:57:32 2011
@@ -1,4 +1,5 @@
 package org.apache.abdera2.common.security;
+import java.security.Key;
 import java.security.SecureRandom;
 
 import javax.crypto.Mac;
@@ -11,21 +12,21 @@ public abstract class KeyBase {
   public static final String DEFAULT_ALG="HmacSHA256";
   public static final int DEFAULT_SIZE=256;
   
-  protected final SecretKeySpec key;
+  protected final Key key;
   protected final String alg;
   protected final int size;
   
   public abstract String generateNext();
   
-  public KeyBase(SecretKeySpec key) {
+  public KeyBase(Key key) {
     this(key,DEFAULT_ALG,DEFAULT_SIZE);
   }
   
-  public KeyBase(SecretKeySpec key, int size) {
+  public KeyBase(Key key, int size) {
     this(key,DEFAULT_ALG,size);
   }
   
-  public KeyBase(SecretKeySpec key, String alg, int size) { 
+  public KeyBase(Key key, String alg, int size) { 
     this.key = key;
     this.alg = alg;
     this.size = size;



Mime
View raw message