Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.credentialsstorage
Interface CredentialsStorageService

All Known Implementing Classes:
CredentialsStorageServiceImpl

public interface CredentialsStorageService

Loads and saves user credentials from/to the persistent storage (configuration file in the default implementation).

Author:
Dmitri Melnikov

Method Summary
 boolean changeMasterPassword(String oldPassword, String newPassword)
          Changes the old master password to the new one.
 boolean isStoredEncrypted(String accountPrefix)
          Checks if the account password that starts with the given prefix is saved in encrypted form.
 boolean isUsingMasterPassword()
          Checks if master password was set by the user and it is used to encrypt saved account passwords.
 String loadPassword(String accountPrefix)
          Load the password for the account that starts with the given prefix.
 boolean removePassword(String accountPrefix)
          Remove the password for the account that starts with the given prefix.
 boolean storePassword(String accountPrefix, String password)
          Store the password for the account that starts with the given prefix.
 boolean verifyMasterPassword(String master)
          Verifies the correctness of the master password.
 

Method Detail

storePassword

boolean storePassword(String accountPrefix,
                      String password)
Store the password for the account that starts with the given prefix.

Parameters:
accountPrefix - account prefix
password - the password to store
Returns:
true if the specified password was successfully stored; otherwise, false

loadPassword

String loadPassword(String accountPrefix)
Load the password for the account that starts with the given prefix.

Parameters:
accountPrefix - account prefix
Returns:
the loaded password for the accountPrefix

removePassword

boolean removePassword(String accountPrefix)
Remove the password for the account that starts with the given prefix.

Parameters:
accountPrefix - account prefix
Returns:
true if the password for the specified accountPrefix was successfully removed; otherwise, false

isUsingMasterPassword

boolean isUsingMasterPassword()
Checks if master password was set by the user and it is used to encrypt saved account passwords.

Returns:
true if used, false if not

changeMasterPassword

boolean changeMasterPassword(String oldPassword,
                             String newPassword)
Changes the old master password to the new one. For all saved account passwords it decrypts them with the old MP and then encrypts them with the new MP.

Parameters:
oldPassword - the old master password
newPassword - the new master password
Returns:
true if master password was changed successfully; false, otherwise

verifyMasterPassword

boolean verifyMasterPassword(String master)
Verifies the correctness of the master password.

Parameters:
master - the master password to verify
Returns:
true if the password is correct; false, otherwise

isStoredEncrypted

boolean isStoredEncrypted(String accountPrefix)
Checks if the account password that starts with the given prefix is saved in encrypted form.

Parameters:
accountPrefix - account prefix
Returns:
true if saved, false if not

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.