public interface PasswordCipher
PasswordCipher allow to encode and decode passwords
used to connect to a database.
Several implementations may exist, as several encryption algorithms may be
supported. One-way encryption algorithm (hash) can't be used as we need to
give a plain password to the database. encrypt(String) method is not
mandatory as we don't need to encode a password, but it's useful to get the
encrypted value for a given plain text password. In the case you have
implemented both methods, you can use the PasswordCodec command line tool to
encode/decode a password.char[] encrypt(String plainPassword)
plainPassword - The password to encode. May not be null, nor empty.String decrypt(char[] encryptedPassword)
encryptedPassword - The ciphered password to decode. May not be null,
nor empty.Copyright © 1999–2014 The Apache Software Foundation. All rights reserved.