Tabnine Logo
IteratedSaltedHashPasswordSpec
Code IndexAdd Tabnine to your IDE (free)

How to use
IteratedSaltedHashPasswordSpec
in
org.wildfly.security.password.spec

Best Java code snippets using org.wildfly.security.password.spec.IteratedSaltedHashPasswordSpec (Showing top 20 results out of 315)

origin: wildfly/wildfly

@Override
<S extends KeySpec> S getKeySpec(Class<S> keySpecType) throws InvalidKeySpecException {
  if (keySpecType.isAssignableFrom(IteratedSaltedHashPasswordSpec.class)) {
    return keySpecType.cast(new IteratedSaltedHashPasswordSpec(this.getHash(), this.getSalt(), this.getIterationCount()));
  } else {
    throw log.invalidKeySpecExpectedSpecGotSpec(IteratedSaltedHashPasswordSpec.class.getName(), keySpecType.getName());
  }
}
origin: wildfly/wildfly

BSDUnixDESCryptPasswordImpl(final IteratedSaltedHashPasswordSpec passwordSpec) throws InvalidKeySpecException, InvalidParameterSpecException {
  this(getSaltValue(passwordSpec.getSalt()), passwordSpec.getIterationCount(), passwordSpec.getHash());
}
origin: wildfly/wildfly

BCryptPasswordImpl(final IteratedSaltedHashPasswordSpec passwordSpec) {
  this(passwordSpec.getHash().clone(), passwordSpec.getSalt().clone(), passwordSpec.getIterationCount());
}
origin: wildfly/wildfly

<S extends KeySpec> S getKeySpec(final Class<S> keySpecType) throws InvalidKeySpecException {
  if (keySpecType.isAssignableFrom(IteratedSaltedHashPasswordSpec.class)) {
    return keySpecType.cast(new IteratedSaltedHashPasswordSpec(hash.clone(), getSaltBytes(salt), iterationCount));
  }
  throw new InvalidKeySpecException();
}
origin: wildfly/wildfly

ScramDigestPasswordImpl(final String algorithm, final IteratedSaltedHashPasswordSpec spec) {
  this(algorithm, spec.getHash().clone(), spec.getSalt().clone(), spec.getIterationCount());
}
origin: wildfly/wildfly

@Override
<S extends KeySpec> S getKeySpec(final Class<S> keySpecType) throws InvalidKeySpecException {
  if (keySpecType.isAssignableFrom(IteratedSaltedHashPasswordSpec.class)) {
    return keySpecType.cast(new IteratedSaltedHashPasswordSpec(getHash(), getSalt(), getIterationCount()));
  }
  throw new InvalidKeySpecException();
}
origin: wildfly/wildfly

SunUnixMD5CryptPasswordImpl(final String algorithm, final IteratedSaltedHashPasswordSpec spec) {
  this(algorithm, spec.getHash().clone(), spec.getSalt().clone(), spec.getIterationCount());
}
origin: wildfly/wildfly

@Override
<S extends KeySpec> S getKeySpec(Class<S> keySpecType) throws InvalidKeySpecException {
  if (keySpecType.isAssignableFrom(IteratedSaltedHashPasswordSpec.class)) {
    return keySpecType.cast(new IteratedSaltedHashPasswordSpec(this.getHash(), this.getSalt(), this.getIterationCount()));
  }
  throw new InvalidKeySpecException();
}
origin: wildfly/wildfly

private static byte[] encodeIteratedSaltedHashSpec(IteratedSaltedHashPasswordSpec keySpec) throws InvalidKeySpecException {
  byte[] salt = keySpec.getSalt();
  return new ByteStringBuilder().append(ITERATED_SALTED_HASH_SPEC_ID)
      .appendPackedUnsignedBE(keySpec.getIterationCount()).appendPackedUnsignedBE(salt.length).append(salt).append(keySpec.getHash()).toArray();
}
origin: wildfly/wildfly

@Override
<S extends KeySpec> S getKeySpec(Class<S> keySpecType) throws InvalidKeySpecException {
  if (keySpecType.isAssignableFrom(IteratedSaltedHashPasswordSpec.class)) {
    return keySpecType.cast(new IteratedSaltedHashPasswordSpec(this.getDigest(), this.getSalt(), this.getIterationCount()));
  }
  throw new InvalidKeySpecException();
}
origin: wildfly/wildfly

IteratedSaltedHashPasswordSpec passwordSpec = passwordFactory.getKeySpec(passwordFactory.translate(password), IteratedSaltedHashPasswordSpec.class);
encoder.startSequence();
encoder.encodeOctetString(passwordSpec.getHash());
encoder.encodeOctetString(passwordSpec.getSalt());
encoder.encodeInteger(passwordSpec.getIterationCount());
encoder.endSequence();
break;
origin: wildfly/wildfly

private static PasswordSpec decodeIteratedSaltedHashPasswordSpec(ByteIterator iterator) {
  int iterationCount = iterator.getPackedBE32();
  byte[] salt = iterator.drain(iterator.getPackedBE32());
  byte[] hash = iterator.drain();
  return new IteratedSaltedHashPasswordSpec(hash, salt, iterationCount);
}
origin: org.wildfly.security/wildfly-elytron

BSDUnixDESCryptPasswordImpl(final IteratedSaltedHashPasswordSpec passwordSpec) throws InvalidKeySpecException, InvalidParameterSpecException {
  this(getSaltValue(passwordSpec.getSalt()), passwordSpec.getIterationCount(), passwordSpec.getHash());
}
origin: wildfly/wildfly

final int iterationCount = decoder.decodeInteger().intValue();
decoder.endSequence();
passwordSpec = new IteratedSaltedHashPasswordSpec(hash, salt, iterationCount);
break;
origin: org.wildfly.security/wildfly-elytron-credential

BSDUnixDESCryptPasswordImpl(final IteratedSaltedHashPasswordSpec passwordSpec) throws InvalidKeySpecException, InvalidParameterSpecException {
  this(getSaltValue(passwordSpec.getSalt()), passwordSpec.getIterationCount(), passwordSpec.getHash());
}
origin: wildfly/wildfly

if (salt != null) {
  if (iterationCount > 0) {
    passwordSpec = new IteratedSaltedHashPasswordSpec(hash, salt, iterationCount);
  } else {
    passwordSpec = new SaltedHashPasswordSpec(hash, salt);
origin: org.jboss.eap/wildfly-client-all

BSDUnixDESCryptPasswordImpl(final IteratedSaltedHashPasswordSpec passwordSpec) throws InvalidKeySpecException, InvalidParameterSpecException {
  this(getSaltValue(passwordSpec.getSalt()), passwordSpec.getIterationCount(), passwordSpec.getHash());
}
origin: org.wildfly.security/wildfly-elytron

@Override
<S extends KeySpec> S getKeySpec(Class<S> keySpecType) throws InvalidKeySpecException {
  if (keySpecType.isAssignableFrom(IteratedSaltedHashPasswordSpec.class)) {
    return keySpecType.cast(new IteratedSaltedHashPasswordSpec(this.getHash(), this.getSalt(), this.getIterationCount()));
  } else {
    throw log.invalidKeySpecExpectedSpecGotSpec(IteratedSaltedHashPasswordSpec.class.getName(), keySpecType.getName());
  }
}
origin: org.wildfly.security/wildfly-elytron-credential

BCryptPasswordImpl(final IteratedSaltedHashPasswordSpec passwordSpec) {
  this(passwordSpec.getHash().clone(), passwordSpec.getSalt().clone(), passwordSpec.getIterationCount());
}
origin: org.wildfly.security/wildfly-elytron-credential

@Override
<S extends KeySpec> S getKeySpec(Class<S> keySpecType) throws InvalidKeySpecException {
  if (keySpecType.isAssignableFrom(IteratedSaltedHashPasswordSpec.class)) {
    return keySpecType.cast(new IteratedSaltedHashPasswordSpec(this.getHash(), this.getSalt(), this.getIterationCount()));
  } else {
    throw log.invalidKeySpecExpectedSpecGotSpec(IteratedSaltedHashPasswordSpec.class.getName(), keySpecType.getName());
  }
}
org.wildfly.security.password.specIteratedSaltedHashPasswordSpec

Javadoc

A PasswordSpec for a password represented by a hash with a salt and a iteration count or cost.

Most used methods

  • <init>
    Construct a new instance.
  • getHash
    Get a password hash bytes.
  • getIterationCount
    Get the iteration count.
  • getSalt
    Get the salt bytes.

Popular in Java

  • Parsing JSON documents to java classes using gson
  • onRequestPermissionsResult (Fragment)
  • onCreateOptionsMenu (Activity)
  • setRequestProperty (URLConnection)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • JComboBox (javax.swing)
  • Top 12 Jupyter Notebook extensions
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