directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dran...@apache.org
Subject [2/2] directory-kerby git commit: DIRKRB-219 Implement random2Key function in Rc4KeyMaker. Contributed by Yaning
Date Thu, 23 Apr 2015 08:39:10 GMT
DIRKRB-219 Implement random2Key function in Rc4KeyMaker. Contributed by Yaning


Project: http://git-wip-us.apache.org/repos/asf/directory-kerby/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-kerby/commit/39ce3273
Tree: http://git-wip-us.apache.org/repos/asf/directory-kerby/tree/39ce3273
Diff: http://git-wip-us.apache.org/repos/asf/directory-kerby/diff/39ce3273

Branch: refs/heads/master
Commit: 39ce327318dfe1d52726f4778bb3d23c6ecbfbf2
Parents: 994f4f0
Author: Drankye <drankye@gmail.com>
Authored: Fri Apr 24 00:28:12 2015 +0800
Committer: Drankye <drankye@gmail.com>
Committed: Fri Apr 24 00:28:12 2015 +0800

----------------------------------------------------------------------
 .../apache/kerby/kerberos/kerb/crypto/key/Rc4KeyMaker.java  | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/39ce3273/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/key/Rc4KeyMaker.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/key/Rc4KeyMaker.java
b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/key/Rc4KeyMaker.java
index 85e8ba2..c362aad 100644
--- a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/key/Rc4KeyMaker.java
+++ b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/key/Rc4KeyMaker.java
@@ -49,4 +49,11 @@ public class Rc4KeyMaker extends AbstractKeyMaker {
         }
     }
 
-}
+    @Override
+    public byte[] random2Key(byte[] randomBits) throws KrbException {
+        if (randomBits.length != encProvider().keyInputSize()) {
+            throw new KrbException("Invalid random bits, not of correct bytes size");
+        }
+        return randomBits;
+    }
+}
\ No newline at end of file


Mime
View raw message