test_class.file: shardingsphere-scaling/shardingsphere-scaling-mysql/src/test/java/org/apache/shardingsphere/scaling/mysql/client/MySQLPasswordEncryptorTest.java
test_class.identifier: MySQLPasswordEncryptorTest
test_case.body: @Test
      public void assertEncryptWithMySQL41() throws NoSuchAlgorithmException {
          byte[] passwordBytes = "password".getBytes();
          byte[] seed = getRandomSeed();
          assertThat(MySQLPasswordEncryptor.encryptWithMySQL41(passwordBytes, seed), is(getExpectedPassword()));
      }
test_case.class_method_signature: MySQLPasswordEncryptorTest.assertEncryptWithMySQL41()
test_case.full_signature: @Test public void assertEncryptWithMySQL41()
test_case.identifier: assertEncryptWithMySQL41
test_case.invocations: getBytes getRandomSeed assertThat encryptWithMySQL41 is getExpectedPassword
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertEncryptWithMySQL41()
focal_class.file: shardingsphere-scaling/shardingsphere-scaling-mysql/src/main/java/org/apache/shardingsphere/scaling/mysql/client/MySQLPasswordEncryptor.java
focal_class.identifier: MySQLPasswordEncryptor
focal_class.class_method_signature: MySQLPasswordEncryptor.encryptWithMySQL41(final byte[] password, final byte[] seed)
focal_class.full_signature: public static byte[] encryptWithMySQL41(final byte[] password, final byte[] seed)
focal_class.identifier: encryptWithMySQL41
focal_class.modifiers: public static
focal_class.parameters: (final byte[] password, final byte[] seed)
focal_class.return: byte[]
focal_class.signature: byte[] encryptWithMySQL41(final byte[] password, final byte[] seed)
focal_class.class_method_signature: MySQLPasswordEncryptor.concatSeed(final MessageDigest messageDigest, final byte[] seed, final byte[] passwordSha1)
focal_class.full_signature: private static byte[] concatSeed(final MessageDigest messageDigest, final byte[] seed, final byte[] passwordSha1)
focal_class.identifier: concatSeed
focal_class.modifiers: private static
focal_class.parameters: (final MessageDigest messageDigest, final byte[] seed, final byte[] passwordSha1)
focal_class.return: byte[]
focal_class.signature: byte[] concatSeed(final MessageDigest messageDigest, final byte[] seed, final byte[] passwordSha1)
focal_class.class_method_signature: MySQLPasswordEncryptor.xorPassword(final byte[] passwordSha1, final byte[] concatSeed)
focal_class.full_signature: private static byte[] xorPassword(final byte[] passwordSha1, final byte[] concatSeed)
focal_class.identifier: xorPassword
focal_class.modifiers: private static
focal_class.parameters: (final byte[] passwordSha1, final byte[] concatSeed)
focal_class.return: byte[]
focal_class.signature: byte[] xorPassword(final byte[] passwordSha1, final byte[] concatSeed)
focal_method.body: public static byte[] encryptWithMySQL41(final byte[] password, final byte[] seed) throws NoSuchAlgorithmException {
          MessageDigest messageDigest = MessageDigest.getInstance("SHA-1");
          byte[] passwordSha1 = messageDigest.digest(password);
          byte[] concatSeed = concatSeed(messageDigest, seed, messageDigest.digest(passwordSha1));
          return xorPassword(passwordSha1, concatSeed);
      }
focal_method.class_method_signature: MySQLPasswordEncryptor.encryptWithMySQL41(final byte[] password, final byte[] seed)
focal_method.full_signature: public static byte[] encryptWithMySQL41(final byte[] password, final byte[] seed)
focal_method.identifier: encryptWithMySQL41
focal_method.invocations: getInstance digest concatSeed digest xorPassword
focal_method.modifiers: public static
focal_method.parameters: (final byte[] password, final byte[] seed)
focal_method.return: byte[]
focal_method.signature: byte[] encryptWithMySQL41(final byte[] password, final byte[] seed)