Tabnine Logo
PasswordUtil.createStoragePassword
Code IndexAdd Tabnine to your IDE (free)

How to use
createStoragePassword
method
in
org.apache.directory.api.ldap.model.password.PasswordUtil

Best Java code snippets using org.apache.directory.api.ldap.model.password.PasswordUtil.createStoragePassword (Showing top 7 results out of 315)

origin: com.qwazr/qwazr-library-ldap

public byte[] getShaPassword(final String clearPassword) {
  return PasswordUtil.createStoragePassword(clearPassword.getBytes(), LdapSecurityConstants.HASH_METHOD_SHA);
}
origin: org.apache.directory.api/api-ldap-client-all

/**
 * @see #createStoragePassword(byte[], LdapSecurityConstants)
 * 
 * @param credentials The password
 * @param algorithm The algorithm to use
 * @return The resulting byte[] containing the paswword
 */
public static byte[] createStoragePassword( String credentials, LdapSecurityConstants algorithm )
{
  return createStoragePassword( Strings.getBytesUtf8( credentials ), algorithm );
}
origin: org.apache.directory.api/api-all

/**
 * @see #createStoragePassword(byte[], LdapSecurityConstants)
 * 
 * @param credentials The password
 * @param algorithm The algorithm to use
 * @return The resulting byte[] containing the paswword
 */
public static byte[] createStoragePassword( String credentials, LdapSecurityConstants algorithm )
{
  return createStoragePassword( Strings.getBytesUtf8( credentials ), algorithm );
}
origin: org.apache.directory.api/api-ldap-model

/**
 * @see #createStoragePassword(byte[], LdapSecurityConstants)
 * 
 * @param credentials The password
 * @param algorithm The algorithm to use
 * @return The resulting byte[] containing the paswword
 */
public static byte[] createStoragePassword( String credentials, LdapSecurityConstants algorithm )
{
  return createStoragePassword( Strings.getBytesUtf8( credentials ), algorithm );
}
origin: org.apache.directory.server/apacheds-interceptors-hash

values.add( PasswordUtil.createStoragePassword( bytes, algorithm ) );
origin: keeps/roda

/**
 * Modifies user password.
 *
 * @param session
 *          the session.
 * @param username
 *          the username.
 * @param password
 *          the password.
 * @throws LdapException
 *           if some error occurs.
 * @throws NoSuchAlgorithmException
 *           the the algorithm doesn't exist.
 */
private void modifyUserPassword(final CoreSession session, final String username, final String password)
 throws LdapException, NoSuchAlgorithmException {
 LdapSecurityConstants algorithm = LdapSecurityConstants.getAlgorithm(ldapDigestAlgorithm);
 if (algorithm == null) {
  // default to PBKDF2-based encryption method
  algorithm = LdapSecurityConstants.HASH_METHOD_PKCS5S2;
 }
 final String passwordDigest = new String(PasswordUtil.createStoragePassword(password, algorithm));
 session.modify(new Dn(getUserDN(username)),
  new DefaultModification(ModificationOperation.REPLACE_ATTRIBUTE, USER_PASSWORD, passwordDigest));
}
origin: org.apache.directory.server/apacheds-interceptors-hash

byte[] hashedPassword = PasswordUtil.createStoragePassword( userPassword.getBytes(), algorithm );
org.apache.directory.api.ldap.model.passwordPasswordUtilcreateStoragePassword

Popular methods of PasswordUtil

  • findAlgorithm
    Get the algorithm from the stored password. It can be found on the beginning of the stored password,
  • compareCredentials
    Compare the credentials. We have at least 6 algorithms to encrypt the password : * - SHA *
  • compareBytes
    Compare two byte[] in a constant time. This is necessary because using an Array.equals() is not Timi
  • digest
    Compute the hashed password given an algorithm, the credentials and an optional salt.
  • encryptPassword
    encrypts the given credentials based on the algorithm name and optional salt
  • generateCryptSalt
  • generatePbkdf2Hash
    generates a hash based on the PKCS5S2 spec [http://en.wikipedia.org/wiki/PBKDF2] Note: this has bee
  • getCredentials
    Compute the credentials
  • getCryptCredentials
  • getPbkdf2Credentials
    Gets the credentials from a PKCS5S2 hash. The salt for PKCS5S2 hash is prepended to the password
  • merge
  • split
  • merge,
  • split,
  • splitCredentials,
  • isPwdExpired

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (Timer)
  • getSupportFragmentManager (FragmentActivity)
  • runOnUiThread (Activity)
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • JComboBox (javax.swing)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now