1 package com.atlassian.user.security.password;
2
3 import java.util.HashMap;
4
5 public interface PasswordEncryptor
6 {
7 /**
8 * @return an encrypted version of the original {@link String} unencryptedPassword
9 */
10 String encrypt(String unencryptedPassword);
11
12 /**
13 * @deprecated since 13 March 2007, use constructor instead.
14 */
15 void init(HashMap args);
16
17 /**
18 * If the credential is unencrypted, encrypts its value and returns it. Otherwise returns the
19 * already-encrypted value held by the credential.
20 *
21 * @param credential the credential whose encrypted value will be returned
22 * @return the encrypted credential value
23 * @since 2.2
24 */
25 String getEncryptedValue(Credential credential);
26 }