Search in sources :

Example 6 with CoreException

use of com.biglybt.core.CoreException 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)6 File (java.io.File)2 Core (com.biglybt.core.Core)1 CoreLifecycleAdapter (com.biglybt.core.CoreLifecycleAdapter)1 CoreSingleInstanceClient (com.biglybt.core.impl.CoreSingleInstanceClient)1 LogAlert (com.biglybt.core.logging.LogAlert)1 LogEvent (com.biglybt.core.logging.LogEvent)1 SystemProperties (com.biglybt.core.util.SystemProperties)1 PluginInterface (com.biglybt.pif.PluginInterface)1 IUserInterface (com.biglybt.ui.common.IUserInterface)1 StartServer (com.biglybt.ui.common.StartServer)1 StringEncrypter (com.biglybt.ui.console.util.StringEncrypter)1 EncryptionException (com.biglybt.ui.console.util.StringEncrypter.EncryptionException)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 FileOutputStream (java.io.FileOutputStream)1 IOException (java.io.IOException)1 PrintWriter (java.io.PrintWriter)1 MalformedURLException (java.net.MalformedURLException)1 URL (java.net.URL)1 ArrayList (java.util.ArrayList)1