Search in sources :

Example 1 with PlainTextPasswordCipher

use of org.apache.openejb.cipher.PlainTextPasswordCipher in project tomee by apache.

the class PasswordCodecTest method testPlainCodec.

public void testPlainCodec() {
    final PasswordCipher cipher = new PlainTextPasswordCipher();
    assertEquals(PLAIN_PWD, new String(cipher.encrypt(PLAIN_PWD)));
    assertEquals(PLAIN_PWD, cipher.decrypt(PLAIN_PWD.toCharArray()));
}
Also used : PlainTextPasswordCipher(org.apache.openejb.cipher.PlainTextPasswordCipher) PlainTextPasswordCipher(org.apache.openejb.cipher.PlainTextPasswordCipher) PasswordCipher(org.apache.openejb.cipher.PasswordCipher) StaticDESPasswordCipher(org.apache.openejb.cipher.StaticDESPasswordCipher)

Aggregations

PasswordCipher (org.apache.openejb.cipher.PasswordCipher)1 PlainTextPasswordCipher (org.apache.openejb.cipher.PlainTextPasswordCipher)1 StaticDESPasswordCipher (org.apache.openejb.cipher.StaticDESPasswordCipher)1