directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dran...@apache.org
Subject directory-kerby git commit: Clear and clean up some codes
Date Sat, 23 Jan 2016 14:36:16 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/trunk ac3d5bbcc -> b511cd882


Clear and clean up some codes


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

Branch: refs/heads/trunk
Commit: b511cd882c321fab19401532507ec86474183ec7
Parents: ac3d5bb
Author: Kai Zheng <kai.zheng@intel.com>
Authored: Sat Jan 23 22:35:54 2016 +0800
Committer: Kai Zheng <kai.zheng@intel.com>
Committed: Sat Jan 23 22:35:54 2016 +0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/kerby/asn1/UniversalTag.java       | 2 ++
 .../java/org/apache/kerby/asn1/type/Asn1GeneralizedTime.java    | 3 +++
 .../java/org/apache/kerby/asn1/type/Asn1ObjectIdentifier.java   | 2 ++
 .../src/main/java/org/apache/kerby/asn1/type/Asn1UtcTime.java   | 3 +++
 .../org/apache/kerby/kerberos/kerb/crypto/CheckSumHandler.java  | 3 +++
 .../apache/kerby/kerberos/kerb/crypto/EncryptionHandler.java    | 3 +++
 .../java/org/apache/kerby/kerberos/kerb/crypto/dh/DhGroup.java  | 1 -
 .../kerby/kerberos/kerb/crypto/dh/DiffieHellmanClient.java      | 1 -
 .../kerby/kerberos/kerb/crypto/dh/DiffieHellmanServer.java      | 1 -
 .../apache/kerby/kerberos/kerb/crypto/enc/Des3CbcSha1Enc.java   | 3 ++-
 .../apache/kerby/kerberos/kerb/crypto/enc/KeKiHmacSha1Enc.java  | 3 ++-
 .../org/apache/kerby/kerberos/kerb/crypto/CamelliaEncTest.java  | 5 ++++-
 .../org/apache/kerby/kerberos/kerb/crypto/CheckSumTest.java     | 2 ++
 .../org/apache/kerby/kerberos/kerb/crypto/CheckSumsTest.java    | 2 ++
 .../java/org/apache/kerby/kerberos/kerb/crypto/CmacTest.java    | 3 +++
 .../java/org/apache/kerby/kerberos/kerb/crypto/Crc32Test.java   | 3 +++
 .../org/apache/kerby/kerberos/kerb/crypto/DecryptionTest.java   | 2 ++
 .../org/apache/kerby/kerberos/kerb/crypto/FastUtilTest.java     | 4 ++++
 .../org/apache/kerby/kerberos/kerb/crypto/KeyDeriveTest.java    | 2 ++
 .../java/org/apache/kerby/kerberos/kerb/crypto/PrfTest.java     | 3 +++
 20 files changed, 45 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/b511cd88/kerby-common/kerby-asn1/src/main/java/org/apache/kerby/asn1/UniversalTag.java
----------------------------------------------------------------------
diff --git a/kerby-common/kerby-asn1/src/main/java/org/apache/kerby/asn1/UniversalTag.java
b/kerby-common/kerby-asn1/src/main/java/org/apache/kerby/asn1/UniversalTag.java
index 3fc5026..c188f52 100644
--- a/kerby-common/kerby-asn1/src/main/java/org/apache/kerby/asn1/UniversalTag.java
+++ b/kerby-common/kerby-asn1/src/main/java/org/apache/kerby/asn1/UniversalTag.java
@@ -21,6 +21,8 @@ package org.apache.kerby.asn1;
 
 /**
  * An enumeration for every ASN.1 UNIVERSAL type.
+ *
+ * Ref. BERTags in BouncyCastle library.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/b511cd88/kerby-common/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1GeneralizedTime.java
----------------------------------------------------------------------
diff --git a/kerby-common/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1GeneralizedTime.java
b/kerby-common/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1GeneralizedTime.java
index 48d0cef..9738df2 100644
--- a/kerby-common/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1GeneralizedTime.java
+++ b/kerby-common/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1GeneralizedTime.java
@@ -29,6 +29,9 @@ import java.util.Date;
 import java.util.SimpleTimeZone;
 import java.util.TimeZone;
 
+/**
+ * Ref. ASN1GeneralizedTime class in BouncyCastle library.
+ */
 public class Asn1GeneralizedTime extends Asn1Simple<Date> {
     public Asn1GeneralizedTime() {
         this(null);

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/b511cd88/kerby-common/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1ObjectIdentifier.java
----------------------------------------------------------------------
diff --git a/kerby-common/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1ObjectIdentifier.java
b/kerby-common/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1ObjectIdentifier.java
index 9c4a9f7..1cc1e99 100644
--- a/kerby-common/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1ObjectIdentifier.java
+++ b/kerby-common/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1ObjectIdentifier.java
@@ -26,6 +26,8 @@ import java.nio.ByteBuffer;
 
 /**
  * ASN1 object identifier.
+ *
+ * Ref. ASN1ObjectIdentifier class in BouncyCastle library.
  */
 public class Asn1ObjectIdentifier extends Asn1Simple<String> {
     public Asn1ObjectIdentifier() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/b511cd88/kerby-common/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1UtcTime.java
----------------------------------------------------------------------
diff --git a/kerby-common/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1UtcTime.java
b/kerby-common/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1UtcTime.java
index 2d0e884..3c048f0 100644
--- a/kerby-common/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1UtcTime.java
+++ b/kerby-common/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1UtcTime.java
@@ -28,6 +28,9 @@ import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.SimpleTimeZone;
 
+/**
+ * Ref. ASN1UTCTime class in BouncyCastle library.
+ */
 public class Asn1UtcTime extends Asn1Simple<Date> {
     public Asn1UtcTime() {
         this(null);

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/b511cd88/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/CheckSumHandler.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/CheckSumHandler.java
b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/CheckSumHandler.java
index f00570f..e920fb4 100644
--- a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/CheckSumHandler.java
+++ b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/CheckSumHandler.java
@@ -65,6 +65,9 @@ public class CheckSumHandler {
         return getCheckSumHandler(cksumType, false);
     }
 
+    /**
+     * Ref. cksumtypes.c in MIT krb5 project.
+     */
     private static CheckSumTypeHandler getCheckSumHandler(CheckSumType cksumType,
                                                           boolean check) throws KrbException
{
         CheckSumTypeHandler cksumHandler = null;

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/b511cd88/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/EncryptionHandler.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/EncryptionHandler.java
b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/EncryptionHandler.java
index 0e6344b..db33e53 100644
--- a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/EncryptionHandler.java
+++ b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/EncryptionHandler.java
@@ -103,6 +103,9 @@ public class EncryptionHandler {
                                                 boolean check) throws KrbException {
         EncTypeHandler encHandler = null;
 
+        /**
+         * Ref. etypes.c in MIT krb5 project.
+         */
         switch (eType) {
             case DES_CBC_CRC:
                 encHandler = new DesCbcCrcEnc();

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/b511cd88/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/dh/DhGroup.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/dh/DhGroup.java
b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/dh/DhGroup.java
index a3099e3..7845295 100644
--- a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/dh/DhGroup.java
+++ b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/dh/DhGroup.java
@@ -31,7 +31,6 @@ import java.math.BigInteger;
  * SHOULD support Oakley 4096-bit MODP well-known group 16 [RFC3526]."
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$, $Date$
  */
 public class DhGroup {
     /**

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/b511cd88/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/dh/DiffieHellmanClient.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/dh/DiffieHellmanClient.java
b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/dh/DiffieHellmanClient.java
index 1997f7c..2072f3f 100644
--- a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/dh/DiffieHellmanClient.java
+++ b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/dh/DiffieHellmanClient.java
@@ -39,7 +39,6 @@ import java.security.spec.X509EncodedKeySpec;
  * The client-side of Diffie-Hellman key agreement for Kerberos PKINIT.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$, $Date$
  */
 public class DiffieHellmanClient {
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/b511cd88/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/dh/DiffieHellmanServer.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/dh/DiffieHellmanServer.java
b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/dh/DiffieHellmanServer.java
index 501f638..380f987 100644
--- a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/dh/DiffieHellmanServer.java
+++ b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/dh/DiffieHellmanServer.java
@@ -39,7 +39,6 @@ import java.security.spec.X509EncodedKeySpec;
  * The server-side of Diffie-Hellman key agreement for Kerberos PKINIT.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$, $Date$
  */
 public class DiffieHellmanServer {
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/b511cd88/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/enc/Des3CbcSha1Enc.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/enc/Des3CbcSha1Enc.java
b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/enc/Des3CbcSha1Enc.java
index 18cfa11..f249439 100644
--- a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/enc/Des3CbcSha1Enc.java
+++ b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/enc/Des3CbcSha1Enc.java
@@ -28,7 +28,8 @@ import org.apache.kerby.kerberos.kerb.type.base.EncryptionType;
 public class Des3CbcSha1Enc extends KeKiHmacSha1Enc {
 
     public Des3CbcSha1Enc() {
-        super(new Des3Provider(), new Sha1Provider(), new Des3KeyMaker(new Des3Provider()));
+        super(new Des3Provider(), new Sha1Provider(),
+            new Des3KeyMaker(new Des3Provider()));
         keyMaker(new Des3KeyMaker(this.encProvider()));
     }
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/b511cd88/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/enc/KeKiHmacSha1Enc.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/enc/KeKiHmacSha1Enc.java
b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/enc/KeKiHmacSha1Enc.java
index 6cf1563..6086b74 100644
--- a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/enc/KeKiHmacSha1Enc.java
+++ b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/enc/KeKiHmacSha1Enc.java
@@ -39,7 +39,8 @@ public abstract class KeKiHmacSha1Enc extends KeKiEnc {
     @Override
     public byte[] prf(byte[] key, byte[] seed) throws KrbException {
         byte[] prfConst = "prf".getBytes(StandardCharsets.UTF_8);
-        int cksumSize = (hashProvider().hashSize() / encProvider().blockSize()) * encProvider().blockSize();
+        int cksumSize = (hashProvider().hashSize() / encProvider().blockSize())
+            * encProvider().blockSize();
         byte[] cksum = new byte[cksumSize];
         byte[] kp;
         byte[] output = new byte[prfSize()];

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/b511cd88/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/CamelliaEncTest.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/CamelliaEncTest.java
b/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/CamelliaEncTest.java
index a8faf38..d682ac1 100644
--- a/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/CamelliaEncTest.java
+++ b/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/CamelliaEncTest.java
@@ -36,6 +36,9 @@ import java.util.List;
 
 import static org.assertj.core.api.Assertions.assertThat;
 
+/**
+ * Ref. camellia-test.c test in MIT krb5 project.
+ */
 public class CamelliaEncTest {
 
     private List<String> outputs = new ArrayList<String>();
@@ -45,7 +48,7 @@ public class CamelliaEncTest {
     private EncryptProvider encProvider;
 
     private List<String> getExpectedLines() throws IOException {
-        InputStream res = CamelliaEncTest.class.getResourceAsStream("/camellia-expect-vt.txt");
+        InputStream res = getClass().getResourceAsStream("/camellia-expect-vt.txt");
         BufferedReader br = new BufferedReader(new InputStreamReader(res));
 
         List<String> results = new ArrayList<String>();

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/b511cd88/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/CheckSumTest.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/CheckSumTest.java
b/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/CheckSumTest.java
index 672dbe4..89a8781 100644
--- a/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/CheckSumTest.java
+++ b/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/CheckSumTest.java
@@ -30,6 +30,8 @@ import org.junit.Test;
 import static org.assertj.core.api.Assertions.fail;
 
 /**
+ * Ref. t_cksum.c in MIT krb5 project.
+ *
  * Only used to test for rsa-md4-des and rsa-md5-des
  */
 public class CheckSumTest {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/b511cd88/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/CheckSumsTest.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/CheckSumsTest.java
b/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/CheckSumsTest.java
index daca47b..ef25663 100644
--- a/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/CheckSumsTest.java
+++ b/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/CheckSumsTest.java
@@ -31,6 +31,8 @@ import static org.assertj.core.api.Assertions.fail;
 import static org.junit.Assume.assumeTrue;
 
 /**
+ * Ref. t_cksums.c in MIT krb5 project.
+ *
  * These are to test the checksums of good answers, and the checksums
  * are deterministic. For other cases, look at CheckSumTest.
  */

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/b511cd88/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/CmacTest.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/CmacTest.java
b/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/CmacTest.java
index 8d0d01d..35dd389 100644
--- a/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/CmacTest.java
+++ b/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/CmacTest.java
@@ -28,6 +28,9 @@ import org.junit.Test;
 
 import static org.assertj.core.api.Assertions.assertThat;
 
+/**
+ * Ref. t_cmac.c test in MIT krb5 project.
+ */
 public class CmacTest {
 
     /* All examples use the following Camellia-128 key. */

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/b511cd88/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/Crc32Test.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/Crc32Test.java
b/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/Crc32Test.java
index 7ac5f25..c0cf9cb 100644
--- a/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/Crc32Test.java
+++ b/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/Crc32Test.java
@@ -25,6 +25,9 @@ import org.junit.Test;
 
 import static org.assertj.core.api.Assertions.assertThat;
 
+/**
+ * Ref. t_crc.c test in MIT krb5 project.
+ */
 public class Crc32Test {
 
     static class TestCase {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/b511cd88/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/DecryptionTest.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/DecryptionTest.java
b/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/DecryptionTest.java
index 7705b7f..52e0129 100644
--- a/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/DecryptionTest.java
+++ b/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/DecryptionTest.java
@@ -31,6 +31,8 @@ import static org.assertj.core.api.Assertions.fail;
 import static org.junit.Assume.assumeTrue;
 
 /**
+ * Ref. t_decrypt.c test in MIT krb5 project.
+ *
  * Decryption test with known ciphertexts.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/b511cd88/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/FastUtilTest.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/FastUtilTest.java
b/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/FastUtilTest.java
index 17638c0..7b18ec9 100644
--- a/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/FastUtilTest.java
+++ b/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/FastUtilTest.java
@@ -31,6 +31,9 @@ import java.util.Arrays;
 import static org.assertj.core.api.Assertions.fail;
 import static org.junit.Assume.assumeTrue;
 
+/**
+ * Ref. fast util test codes in MIT krb5 project.
+ */
 public class FastUtilTest {
     static class TestCase {
         EncryptionType encType;
@@ -39,6 +42,7 @@ public class FastUtilTest {
         String pepper1;
         String pepper2;
         String answer;
+
         TestCase(EncryptionType encType, String keyData1, String keyData2,
                  String pepper1, String pepper2, String answer) {
             this.encType = encType;

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/b511cd88/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/KeyDeriveTest.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/KeyDeriveTest.java
b/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/KeyDeriveTest.java
index c352967..1fcb242 100644
--- a/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/KeyDeriveTest.java
+++ b/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/KeyDeriveTest.java
@@ -39,6 +39,8 @@ import static org.assertj.core.api.Assertions.fail;
 import static org.junit.Assume.assumeTrue;
 
 /**
+ * Ref. t_derive.c test in MIT krb5 project.
+ *
  * Key derivation test with known values.
  */
 public class KeyDeriveTest {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/b511cd88/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/PrfTest.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/PrfTest.java
b/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/PrfTest.java
index 71832d8..833dd91 100644
--- a/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/PrfTest.java
+++ b/kerby-kerb/kerb-crypto/src/test/java/org/apache/kerby/kerberos/kerb/crypto/PrfTest.java
@@ -29,6 +29,9 @@ import java.util.Arrays;
 import static org.assertj.core.api.Assertions.fail;
 import static org.junit.Assume.assumeTrue;
 
+/**
+ * Ref. t_prf.c test in MIT krb5 project.
+ */
 public class PrfTest {
     private static void performTest(TestCase testCase) throws Exception {
         byte[] keyData = EncryptionHandler.getEncHandler(testCase.encType)


Mime
View raw message