test_class.declarator: logger = LoggerFactory.getLogger(HasherTest.class)
test_class.modifier: private static final
test_class.original_string: private static final Logger logger = LoggerFactory.getLogger(HasherTest.class);
test_class.type: Logger
test_class.var_name: logger
test_class.declarator: MD5_SAMPLE1 = "test"
test_class.modifier: private static final
test_class.original_string: private static final String MD5_SAMPLE1 = "test";
test_class.type: String
test_class.var_name: MD5_SAMPLE1
test_class.declarator: MD5_SAMPLE1_HASH = "098f6bcd4621d373cade4e832627b4f6".toUpperCase()
test_class.modifier: private static final
test_class.original_string: private static final String MD5_SAMPLE1_HASH = "098f6bcd4621d373cade4e832627b4f6".toUpperCase();
test_class.type: String
test_class.var_name: MD5_SAMPLE1_HASH
test_class.declarator: MD5_SAMPLE2 = "hello world"
test_class.modifier: private static final
test_class.original_string: private static final String MD5_SAMPLE2 = "hello world";
test_class.type: String
test_class.var_name: MD5_SAMPLE2
test_class.declarator: MD5_SAMPLE2_HASH = "5eb63bbbe01eeed093cb22bb8f5acdc3".toUpperCase()
test_class.modifier: private static final
test_class.original_string: private static final String MD5_SAMPLE2_HASH = "5eb63bbbe01eeed093cb22bb8f5acdc3".toUpperCase();
test_class.type: String
test_class.var_name: MD5_SAMPLE2_HASH
test_class.declarator: MD5_SAMPLE3 = "this is going to be a super long string that has spaces, etc. and ! I'm really happy that I'll be testing the MD5 hash to its fullest!!!!"
test_class.modifier: private static final
test_class.original_string: private static final String MD5_SAMPLE3 = "this is going to be a super long string that has spaces, etc. and ! I'm really happy that I'll be testing the MD5 hash to its fullest!!!!";
test_class.type: String
test_class.var_name: MD5_SAMPLE3
test_class.declarator: MD5_SAMPLE3_HASH = "6c18b1eb40a59dc9ce43f62f4962219c".toUpperCase()
test_class.modifier: private static final
test_class.original_string: private static final String MD5_SAMPLE3_HASH = "6c18b1eb40a59dc9ce43f62f4962219c".toUpperCase();
test_class.type: String
test_class.var_name: MD5_SAMPLE3_HASH
test_class.declarator: SHA1_SAMPLE1 = "test"
test_class.modifier: private static final
test_class.original_string: private static final String SHA1_SAMPLE1 = "test";
test_class.type: String
test_class.var_name: SHA1_SAMPLE1
test_class.declarator: SHA1_SAMPLE1_HASH = "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3".toUpperCase()
test_class.modifier: private static final
test_class.original_string: private static final String SHA1_SAMPLE1_HASH = "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3".toUpperCase();
test_class.type: String
test_class.var_name: SHA1_SAMPLE1_HASH
test_class.declarator: SHA1_SAMPLE2 = "th1s!typic@lpassWd"
test_class.modifier: private static final
test_class.original_string: private static final String SHA1_SAMPLE2 = "th1s!typic@lpassWd";
test_class.type: String
test_class.var_name: SHA1_SAMPLE2
test_class.declarator: SHA1_SAMPLE2_HASH = "605fea3566504158c869ab98fb36858d68c490a6".toUpperCase()
test_class.modifier: private static final
test_class.original_string: private static final String SHA1_SAMPLE2_HASH = "605fea3566504158c869ab98fb36858d68c490a6".toUpperCase();
test_class.type: String
test_class.var_name: SHA1_SAMPLE2_HASH
test_class.declarator: SHA1_SAMPLE3 = "this is going to be a super long string that has spaces, etc. and ! I'm really happy that I'll be testing the MD5 hash to its fullest!!!!"
test_class.modifier: private static final
test_class.original_string: private static final String SHA1_SAMPLE3 = "this is going to be a super long string that has spaces, etc. and ! I'm really happy that I'll be testing the MD5 hash to its fullest!!!!";
test_class.type: String
test_class.var_name: SHA1_SAMPLE3
test_class.declarator: SHA1_SAMPLE3_HASH = "4a728cea6aec64cc6d7f022389019f1ecca85ed0".toUpperCase()
test_class.modifier: private static final
test_class.original_string: private static final String SHA1_SAMPLE3_HASH = "4a728cea6aec64cc6d7f022389019f1ecca85ed0".toUpperCase();
test_class.type: String
test_class.var_name: SHA1_SAMPLE3_HASH
test_class.declarator: SHA256_SAMPLE1 = "test"
test_class.modifier: private static final
test_class.original_string: private static final String SHA256_SAMPLE1 = "test";
test_class.type: String
test_class.var_name: SHA256_SAMPLE1
test_class.declarator: SHA256_SAMPLE1_HASH = "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08".toUpperCase()
test_class.modifier: private static final
test_class.original_string: private static final String SHA256_SAMPLE1_HASH = "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08".toUpperCase();
test_class.type: String
test_class.var_name: SHA256_SAMPLE1_HASH
test_class.declarator: SHA256_SAMPLE2 = "th1s!typic@lpassWd"
test_class.modifier: private static final
test_class.original_string: private static final String SHA256_SAMPLE2 = "th1s!typic@lpassWd";
test_class.type: String
test_class.var_name: SHA256_SAMPLE2
test_class.declarator: SHA256_SAMPLE2_HASH = "5178d956703d8a15c2d5516771f8398d446f56f40d1651a9278a178cb883dbeb".toUpperCase()
test_class.modifier: private static final
test_class.original_string: private static final String SHA256_SAMPLE2_HASH = "5178d956703d8a15c2d5516771f8398d446f56f40d1651a9278a178cb883dbeb".toUpperCase();
test_class.type: String
test_class.var_name: SHA256_SAMPLE2_HASH
test_class.declarator: SHA256_SAMPLE3 = "this is going to be a super long string that has spaces, etc. and ! I'm really happy that I'll be testing the MD5 hash to its fullest!!!!"
test_class.modifier: private static final
test_class.original_string: private static final String SHA256_SAMPLE3 = "this is going to be a super long string that has spaces, etc. and ! I'm really happy that I'll be testing the MD5 hash to its fullest!!!!";
test_class.type: String
test_class.var_name: SHA256_SAMPLE3
test_class.declarator: SHA256_SAMPLE3_HASH = "614cf1ee45df9ce592fa1bfc3d9a9f9bc6ad887a882987e467f9a3002d779151".toUpperCase()
test_class.modifier: private static final
test_class.original_string: private static final String SHA256_SAMPLE3_HASH = "614cf1ee45df9ce592fa1bfc3d9a9f9bc6ad887a882987e467f9a3002d779151".toUpperCase();
test_class.type: String
test_class.var_name: SHA256_SAMPLE3_HASH
test_class.declarator: SHA512_SAMPLE1 = "test"
test_class.modifier: private static final
test_class.original_string: private static final String SHA512_SAMPLE1 = "test";
test_class.type: String
test_class.var_name: SHA512_SAMPLE1
test_class.declarator: SHA512_SAMPLE1_HASH = "ee26b0dd4af7e749aa1a8ee3c10ae9923f618980772e473f8819a5d4940e0db27ac185f8a0e1d5f84f88bc887fd67b143732c304cc5fa9ad8e6f57f50028a8ff".toUpperCase()
test_class.modifier: private static final
test_class.original_string: private static final String SHA512_SAMPLE1_HASH = "ee26b0dd4af7e749aa1a8ee3c10ae9923f618980772e473f8819a5d4940e0db27ac185f8a0e1d5f84f88bc887fd67b143732c304cc5fa9ad8e6f57f50028a8ff".toUpperCase();
test_class.type: String
test_class.var_name: SHA512_SAMPLE1_HASH
test_class.declarator: SHA512_SAMPLE2 = "th1s!typic@lpassWd"
test_class.modifier: private static final
test_class.original_string: private static final String SHA512_SAMPLE2 = "th1s!typic@lpassWd";
test_class.type: String
test_class.var_name: SHA512_SAMPLE2
test_class.declarator: SHA512_SAMPLE2_HASH = "8085dbc8919e03ee7c093670e7bd86683b8fee8e0397998f4f74efe4ad6eae323af0bdaa3f3df0558c71f63b27057e1120d962e9c6fa7f86274347334f47b63f".toUpperCase()
test_class.modifier: private static final
test_class.original_string: private static final String SHA512_SAMPLE2_HASH = "8085dbc8919e03ee7c093670e7bd86683b8fee8e0397998f4f74efe4ad6eae323af0bdaa3f3df0558c71f63b27057e1120d962e9c6fa7f86274347334f47b63f".toUpperCase();
test_class.type: String
test_class.var_name: SHA512_SAMPLE2_HASH
test_class.declarator: SHA512_SAMPLE3 = "this is going to be a super long string that has spaces, etc. and ! I'm really happy that I'll be testing the MD5 hash to its fullest!!!!"
test_class.modifier: private static final
test_class.original_string: private static final String SHA512_SAMPLE3 = "this is going to be a super long string that has spaces, etc. and ! I'm really happy that I'll be testing the MD5 hash to its fullest!!!!";
test_class.type: String
test_class.var_name: SHA512_SAMPLE3
test_class.declarator: SHA512_SAMPLE3_HASH = "14a47a42148abd5a12a0cea35ada405025eff87fe713c7664afc62332f8d852ed9b6f61accd1e3782512a1447851412efea094c81ec61268704d3f2b198b65be".toUpperCase()
test_class.modifier: private static final
test_class.original_string: private static final String SHA512_SAMPLE3_HASH = "14a47a42148abd5a12a0cea35ada405025eff87fe713c7664afc62332f8d852ed9b6f61accd1e3782512a1447851412efea094c81ec61268704d3f2b198b65be".toUpperCase();
test_class.type: String
test_class.var_name: SHA512_SAMPLE3_HASH
test_class.file: ch-commons-util/src/test/java/com/cloudhopper/commons/util/HasherTest.java
test_class.identifier: HasherTest
test_case.body: @Test
      public void toHashedHexStringMD5() throws Exception {
          // MD5 is default, this will make sure we don't break that
          Hasher hasher = new Hasher();
          String sample1 = hasher.toHashedHexString(MD5_SAMPLE1);
          Assert.assertEquals(MD5_SAMPLE1_HASH, sample1);
          String sample2 = hasher.toHashedHexString(MD5_SAMPLE2);
          Assert.assertEquals(MD5_SAMPLE2_HASH, sample2);
          String sample3 = hasher.toHashedHexString(MD5_SAMPLE3);
          Assert.assertEquals(MD5_SAMPLE3_HASH, sample3);
          Assert.assertEquals(32, sample3.length());
      }
test_case.class_method_signature: HasherTest.toHashedHexStringMD5()
test_case.full_signature: @Test public void toHashedHexStringMD5()
test_case.identifier: toHashedHexStringMD5
test_case.invocations: toHashedHexString assertEquals toHashedHexString assertEquals toHashedHexString assertEquals assertEquals length
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void toHashedHexStringMD5()
focal_class.declarator: ALGORITHM_MD5 = "MD5"
focal_class.modifier: private static final
focal_class.original_string: private static final String ALGORITHM_MD5 = "MD5";
focal_class.type: String
focal_class.var_name: ALGORITHM_MD5
focal_class.declarator: ALGORITHM_SHA1 = "SHA-1"
focal_class.modifier: private static final
focal_class.original_string: private static final String ALGORITHM_SHA1 = "SHA-1";
focal_class.type: String
focal_class.var_name: ALGORITHM_SHA1
focal_class.declarator: ALGORITHM_SHA256 = "SHA-256"
focal_class.modifier: private static final
focal_class.original_string: private static final String ALGORITHM_SHA256 = "SHA-256";
focal_class.type: String
focal_class.var_name: ALGORITHM_SHA256
focal_class.declarator: ALGORITHM_SHA512 = "SHA-512"
focal_class.modifier: private static final
focal_class.original_string: private static final String ALGORITHM_SHA512 = "SHA-512";
focal_class.type: String
focal_class.var_name: ALGORITHM_SHA512
focal_class.declarator: algorithm
focal_class.modifier: private
focal_class.original_string: private Algorithm algorithm;
focal_class.type: Algorithm
focal_class.var_name: algorithm
focal_class.file: ch-commons-util/src/main/java/com/cloudhopper/commons/util/Hasher.java
focal_class.identifier: Hasher
focal_class.class_method_signature: Hasher.Hasher()
focal_class.full_signature: public  Hasher()
focal_class.identifier: Hasher
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  Hasher()
focal_class.class_method_signature: Hasher.Hasher(Algorithm algorithm)
focal_class.full_signature: public  Hasher(Algorithm algorithm)
focal_class.identifier: Hasher
focal_class.modifiers: public
focal_class.parameters: (Algorithm algorithm)
focal_class.signature:  Hasher(Algorithm algorithm)
focal_class.class_method_signature: Hasher.toHashedHexString(String string0)
focal_class.full_signature: public String toHashedHexString(String string0)
focal_class.identifier: toHashedHexString
focal_class.modifiers: public
focal_class.parameters: (String string0)
focal_class.return: String
focal_class.signature: String toHashedHexString(String string0)
focal_class.class_method_signature: Hasher.toHashedHexString(byte[] bytes)
focal_class.full_signature: public String toHashedHexString(byte[] bytes)
focal_class.identifier: toHashedHexString
focal_class.modifiers: public
focal_class.parameters: (byte[] bytes)
focal_class.return: String
focal_class.signature: String toHashedHexString(byte[] bytes)
focal_class.class_method_signature: Hasher.toHashedBase64String(String string0)
focal_class.full_signature: public String toHashedBase64String(String string0)
focal_class.identifier: toHashedBase64String
focal_class.modifiers: public
focal_class.parameters: (String string0)
focal_class.return: String
focal_class.signature: String toHashedBase64String(String string0)
focal_class.class_method_signature: Hasher.toHashedBase64String(byte[] bytes)
focal_class.full_signature: public String toHashedBase64String(byte[] bytes)
focal_class.identifier: toHashedBase64String
focal_class.modifiers: public
focal_class.parameters: (byte[] bytes)
focal_class.return: String
focal_class.signature: String toHashedBase64String(byte[] bytes)
focal_class.class_method_signature: Hasher.toHashedBytes(byte[] bytes)
focal_class.full_signature: public byte[] toHashedBytes(byte[] bytes)
focal_class.identifier: toHashedBytes
focal_class.modifiers: public
focal_class.parameters: (byte[] bytes)
focal_class.return: byte[]
focal_class.signature: byte[] toHashedBytes(byte[] bytes)
focal_method.body: public String toHashedHexString(String string0) throws NoSuchAlgorithmException {
          return this.toHashedHexString(StringUtil.getAsciiBytes(string0));
      }
focal_method.class_method_signature: Hasher.toHashedHexString(String string0)
focal_method.full_signature: public String toHashedHexString(String string0)
focal_method.identifier: toHashedHexString
focal_method.invocations: toHashedHexString getAsciiBytes
focal_method.modifiers: public
focal_method.parameters: (String string0)
focal_method.return: String
focal_method.signature: String toHashedHexString(String string0)