|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PasswordStorage
This interface provides the ability to store passwords in a central storage. Each password in the storage is identified by an alias. The alias is a string and may contain [a-zA-Z0-9], and "_" characters.
Method Summary | |
---|---|
void |
deletePassword(String alias)
Deletes the password assigned to the given alias. |
char[] |
getPassword(String alias)
Returns the password associated with the given alias. |
void |
setPassword(String alias,
char[] password)
Stores the given password and assigns it to the given alias. |
Method Detail |
---|
char[] getPassword(String alias) throws PasswordStorageException
alias
- the alias name. Alias may contain [a-zA-Z0-9], and "_" characters.
null
if the given alias does not exist
or does not identify a password.
PasswordStorageException
- If there was an error while trying to get the password.
IllegalArgumentException
- If alias is null
or alias passed to
the method contains unsupported characters.void setPassword(String alias, char[] password) throws PasswordStorageException
alias
- the alias name. Alias may contain [a-zA-Z0-9], and "_" characters.password
- the password to be stored assigned to the given alias. The password length
should be not smaller than 6 characters and not bigger than 255 characters.
PasswordStorageException
- If there was an error while trying to set the password.
IllegalArgumentException
- If alias or password is null
, if alias passed to
the method contains unsupported characters, or if password is smaller than 6 characters or
bigger than 255.void deletePassword(String alias) throws PasswordStorageException
alias
- the alias name. Alias may contain [a-zA-Z0-9], and "_" characters.
PasswordStorageException
- If there was an error while trying to delete the password.
IllegalArgumentException
- If alias is null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |