* @param key the encryption key
* @return encrypted password in base64 encoding
*/
public static String encryptPassword(String password, byte[] key) {
AesCipherService cipherService = new AesCipherService();
ByteSource encrypted = cipherService.encrypt(password.getBytes(), key);
return encrypted.toBase64();
}
/**
* Returns decrypted password using given key