Search in sources :

Example 1 with StringEncrypter

use of com.biglybt.ui.console.util.StringEncrypter in project BiglyBT by BiglySoftware.

the class UserProfile method setPassword.

/**
 * stores the specified password as an encrypted password
 * @param password The password to set.
 */
public void setPassword(String password) {
    try {
        StringEncrypter encrypter = new StringEncrypter(StringEncrypter.DES_ENCRYPTION_SCHEME);
        setEncryptedPassword(encrypter.encrypt(password));
    } catch (EncryptionException e) {
        throw new CoreException("Unable to encrypt password", e);
    }
}
Also used : CoreException(com.biglybt.core.CoreException) EncryptionException(com.biglybt.ui.console.util.StringEncrypter.EncryptionException) StringEncrypter(com.biglybt.ui.console.util.StringEncrypter)

Aggregations

CoreException (com.biglybt.core.CoreException)1 StringEncrypter (com.biglybt.ui.console.util.StringEncrypter)1 EncryptionException (com.biglybt.ui.console.util.StringEncrypter.EncryptionException)1