/** * <p> * Sets the security provider to be asked for the digest algorithm. * The provider does not have to be registered at the security * infrastructure beforehand, and its being used here will not result in * it being registered. * </p> * <p> * If this method is called, calling {@link #setProviderName(String)} * becomes unnecessary. * </p> * <p> * If no provider name / provider is explicitly set, the default JVM * provider will be used. * </p> * * @since 1.3 * * @param provider the provider to be asked for the chosen algorithm * @throws AlreadyInitializedException if it has already been initialized, * this is, if {@link #digest(byte[])} has been called at least * once. */ public void setProvider(final Provider provider) { this.digester.setProvider(provider); }
StandardByteDigester cloneDigester() { // Check initialization if (!isInitialized()) { initialize(); } final StandardByteDigester cloned = new StandardByteDigester(); if (CommonUtils.isNotEmpty(this.algorithm)) { cloned.setAlgorithm(this.algorithm); } cloned.setInvertPositionOfPlainSaltInEncryptionResults(this.invertPositionOfPlainSaltInEncryptionResults); cloned.setInvertPositionOfSaltInMessageBeforeDigesting(this.invertPositionOfSaltInMessageBeforeDigesting); cloned.setIterations(this.iterations); if (this.provider != null) { cloned.setProvider(this.provider); } if (this.providerName != null) { cloned.setProviderName(this.providerName); } if (this.saltGenerator != null) { cloned.setSaltGenerator(this.saltGenerator); } cloned.setSaltSizeBytes(this.saltSizeBytes); cloned.setUseLenientSaltSizeCheck(this.useLenientSaltSizeCheck); return cloned; }
/** * <p> * Sets the security provider to be asked for the digest algorithm. * The provider does not have to be registered at the security * infrastructure beforehand, and its being used here will not result in * its being registered. * </p> * <p> * If this method is called, calling {@link #setProviderName(String)} * becomes unnecessary. * </p> * <p> * If no provider name / provider is explicitly set, the default JVM * provider will be used. * </p> * * @param provider the provider to be asked for the chosen algorithm */ public synchronized void setProvider(final Provider provider) { this.firstDigester.setProvider(provider); }
StandardByteDigester cloneDigester() { // Check initialization if (!isInitialized()) { initialize(); } final StandardByteDigester cloned = new StandardByteDigester(); if (CommonUtils.isNotEmpty(this.algorithm)) { cloned.setAlgorithm(this.algorithm); } cloned.setInvertPositionOfPlainSaltInEncryptionResults(this.invertPositionOfPlainSaltInEncryptionResults); cloned.setInvertPositionOfSaltInMessageBeforeDigesting(this.invertPositionOfSaltInMessageBeforeDigesting); cloned.setIterations(this.iterations); if (this.provider != null) { cloned.setProvider(this.provider); } if (this.providerName != null) { cloned.setProviderName(this.providerName); } if (this.saltGenerator != null) { cloned.setSaltGenerator(this.saltGenerator); } cloned.setSaltSizeBytes(this.saltSizeBytes); cloned.setUseLenientSaltSizeCheck(this.useLenientSaltSizeCheck); return cloned; }
/** * <p> * Sets the security provider to be asked for the digest algorithm. * The provider does not have to be registered at the security * infrastructure beforehand, and its being used here will not result in * its being registered. * </p> * <p> * If this method is called, calling {@link #setProviderName(String)} * becomes unnecessary. * </p> * <p> * If no provider name / provider is explicitly set, the default JVM * provider will be used. * </p> * * @param provider the provider to be asked for the chosen algorithm */ public synchronized void setProvider(final Provider provider) { this.firstDigester.setProvider(provider); }
StandardByteDigester cloneDigester() { // Check initialization if (!isInitialized()) { initialize(); } final StandardByteDigester cloned = new StandardByteDigester(); if (CommonUtils.isNotEmpty(this.algorithm)) { cloned.setAlgorithm(this.algorithm); } cloned.setInvertPositionOfPlainSaltInEncryptionResults(this.invertPositionOfPlainSaltInEncryptionResults); cloned.setInvertPositionOfSaltInMessageBeforeDigesting(this.invertPositionOfSaltInMessageBeforeDigesting); cloned.setIterations(this.iterations); if (this.provider != null) { cloned.setProvider(this.provider); } if (this.providerName != null) { cloned.setProviderName(this.providerName); } if (this.saltGenerator != null) { cloned.setSaltGenerator(this.saltGenerator); } cloned.setSaltSizeBytes(this.saltSizeBytes); cloned.setUseLenientSaltSizeCheck(this.useLenientSaltSizeCheck); return cloned; }
/** * <p> * Sets the security provider to be asked for the digest algorithm. * The provider does not have to be registered at the security * infrastructure beforehand, and its being used here will not result in * its being registered. * </p> * <p> * If this method is called, calling {@link #setProviderName(String)} * becomes unnecessary. * </p> * <p> * If no provider name / provider is explicitly set, the default JVM * provider will be used. * </p> * * @param provider the provider to be asked for the chosen algorithm */ public synchronized void setProvider(final Provider provider) { this.firstDigester.setProvider(provider); }
/** * <p> * Sets the security provider to be asked for the digest algorithm. * The provider does not have to be registered at the security * infrastructure beforehand, and its being used here will not result in * its being registered. * </p> * <p> * If this method is called, calling {@link #setProviderName(String)} * becomes unnecessary. * </p> * <p> * If no provider name / provider is explicitly set, the default JVM * provider will be used. * </p> * * @since 1.3 * * @param provider the provider to be asked for the chosen algorithm */ public void setProvider(final Provider provider) { this.byteDigester.setProvider(provider); }
/** * <p> * Sets the security provider to be asked for the digest algorithm. * The provider does not have to be registered at the security * infrastructure beforehand, and its being used here will not result in * its being registered. * </p> * <p> * If this method is called, calling {@link #setProviderName(String)} * becomes unnecessary. * </p> * <p> * If no provider name / provider is explicitly set, the default JVM * provider will be used. * </p> * * @since 1.3 * * @param provider the provider to be asked for the chosen algorithm */ public void setProvider(final Provider provider) { this.byteDigester.setProvider(provider); }
/** * <p> * Sets the security provider to be asked for the digest algorithm. * The provider does not have to be registered at the security * infrastructure beforehand, and its being used here will not result in * its being registered. * </p> * <p> * If this method is called, calling {@link #setProviderName(String)} * becomes unnecessary. * </p> * <p> * If no provider name / provider is explicitly set, the default JVM * provider will be used. * </p> * * @since 1.3 * * @param provider the provider to be asked for the chosen algorithm */ public void setProvider(final Provider provider) { this.byteDigester.setProvider(provider); }
/** * <p> * Sets the security provider to be asked for the digest algorithm. * The provider does not have to be registered at the security * infrastructure beforehand, and its being used here will not result in * it being registered. * </p> * <p> * If this method is called, calling {@link #setProviderName(String)} * becomes unnecessary. * </p> * <p> * If no provider name / provider is explicitly set, the default JVM * provider will be used. * </p> * * @since 1.3 * * @param provider the provider to be asked for the chosen algorithm * @throws AlreadyInitializedException if it has already been initialized, * this is, if {@link #digest(byte[])} has been called at least * once. */ public void setProvider(final Provider provider) { this.digester.setProvider(provider); }
/** * <p> * Sets the security provider to be asked for the digest algorithm. * The provider does not have to be registered at the security * infrastructure beforehand, and its being used here will not result in * it being registered. * </p> * <p> * If this method is called, calling {@link #setProviderName(String)} * becomes unnecessary. * </p> * <p> * If no provider name / provider is explicitly set, the default JVM * provider will be used. * </p> * * @since 1.3 * * @param provider the provider to be asked for the chosen algorithm * @throws AlreadyInitializedException if it has already been initialized, * this is, if {@link #digest(byte[])} has been called at least * once. */ public void setProvider(final Provider provider) { this.digester.setProvider(provider); }
/** * <p> * Creates a new instance of <tt>Digester</tt>, specifying * the algorithm to be used. * </p> * * @since 1.3 */ public Digester(final String algorithm, final Provider provider) { super(); this.digester = new StandardByteDigester(); this.digester.setIterations(ITERATIONS); this.digester.setSaltSizeBytes(SALT_SIZE_BYTES); this.digester.setAlgorithm(algorithm); this.digester.setProvider(provider); }
/** * <p> * Creates a new instance of <tt>Digester</tt>, specifying * the algorithm to be used. * </p> * * @since 1.3 */ public Digester(final String algorithm, final Provider provider) { super(); this.digester = new StandardByteDigester(); this.digester.setIterations(ITERATIONS); this.digester.setSaltSizeBytes(SALT_SIZE_BYTES); this.digester.setAlgorithm(algorithm); this.digester.setProvider(provider); }
/** * <p> * Creates a new instance of <tt>Digester</tt>, specifying * the algorithm to be used. * </p> * * @since 1.3 */ public Digester(final String algorithm, final Provider provider) { super(); this.digester = new StandardByteDigester(); this.digester.setIterations(ITERATIONS); this.digester.setSaltSizeBytes(SALT_SIZE_BYTES); this.digester.setAlgorithm(algorithm); this.digester.setProvider(provider); }