@Test public void payloadDetection() throws Exception { assertThat(testSubject.isPasswordCipher(null), is(false)); assertIsPasswordCipher("", false); assertIsPasswordCipher("{}", false); assertIsPasswordCipher("{ }", false); assertIsPasswordCipher("{ {} }", false); assertIsPasswordCipher(plaintext, false); assertIsPasswordCipher(plaintext_mixed, false); assertIsPasswordCipher(plaintext_spec_char_xtrabracket, false); assertIsPasswordCipher(plaintext_random, false); assertIsPasswordCipher(plaintext_special_char, false); assertIsPasswordCipher(plaintext_one_bracket, false); assertIsPasswordCipher(encrypted, true); assertIsPasswordCipher(plaintext_mixed_encrypted, true); assertIsPasswordCipher(plaintext_special_encrypted, true); }
@Override public boolean isPasswordCipher(final CharSequence str) { return peel(str) != null; }
MavenCipherImpl implements MavenCipher { @Override public boolean isPasswordCipher(final CharSequence str) { return peel(str) != null; } }
MavenCipherImpl implements MavenCipher { @Override public boolean isPasswordCipher(final CharSequence str) { return peel(str) != null; } @Inject  MavenCipherImpl(final CryptoHelper cryptoHelper); }
MavenCipherImpl implements MavenCipher { @Override public boolean isPasswordCipher(final CharSequence str) { return peel(str) != null; } @Inject  MavenCipherImpl(final CryptoHelper cryptoHelper); @Override String encrypt(final CharSequence str, final String passPhrase); @Override String decrypt(final String str, final String passPhrase); @Override char[] decryptChars(final String str, final String passPhrase); @Override boolean isPasswordCipher(final CharSequence str); }
MavenCipherImpl implements MavenCipher { @Override public boolean isPasswordCipher(final CharSequence str) { return peel(str) != null; } @Inject  MavenCipherImpl(final CryptoHelper cryptoHelper); @Override String encrypt(final CharSequence str, final String passPhrase); @Override String decrypt(final String str, final String passPhrase); @Override char[] decryptChars(final String str, final String passPhrase); @Override boolean isPasswordCipher(final CharSequence str);  }