internal Builder(FipsAlgorithm algorithm, FipsDigestAlgorithm digestAlg, Variations variation, SecureRandom random, IEntropySourceProvider entropySourceProvider) { CryptoStatus.IsReady(); this.algorithm = algorithm; this.digestAlg = digestAlg; this.variation = variation; this.random = random; this.entropySourceProvider = entropySourceProvider; }
public X931TestVector(IBlockCipher engine, IEntropySourceProvider entropyProvider, string key, string dateTimeVector, bool predictionResistant, string[] expected) { this.engine = engine; this.entropyProvider = entropyProvider; this.key = key; this.dateTimeVector = dateTimeVector; this.predictionResistant = predictionResistant; this.expected = expected; }
/** * Create a builder which makes creates the SecureRandom objects from a specified entropy source provider. * <p> * <b>Note:</b> If this constructor is used any calls to setSeed() in the resulting SecureRandom will be ignored. * </p> * @param entropySourceProvider a provider of EntropySource objects. */ public X931SecureRandomBuilder(IEntropySourceProvider entropySourceProvider) { this.mRandom = null; this.mEntropySourceProvider = entropySourceProvider; }
/** * Construct a builder with an EntropySourceProvider based on the passed in SecureRandom and the passed in value * for prediction resistance. * <p> * Any SecureRandom created from a builder constructed like this will make use of input passed to SecureRandom.setSeed() if * the passed in SecureRandom does for its generateSeed() call. * </p> * @param entropySource * @param predictionResistant */ public X931SecureRandomBuilder(SecureRandom entropySource, bool predictionResistant) { this.mRandom = entropySource; this.mEntropySourceProvider = new BasicEntropySourceProvider(mRandom, predictionResistant); }
/** * Create a builder which makes creates the SecureRandom objects from a specified entropy source provider. * <p> * <b>Note:</b> If this constructor is used any calls to setSeed() in the resulting SecureRandom will be ignored. * </p> * @param entropySourceProvider a provider of EntropySource objects. */ public SP800SecureRandomBuilder(IEntropySourceProvider entropySourceProvider) { this.mRandom = null; this.mEntropySourceProvider = entropySourceProvider; }
/** * Construct a builder with an EntropySourceProvider based on the passed in SecureRandom and the passed in value * for prediction resistance. * <p> * Any SecureRandom created from a builder constructed like this will make use of input passed to SecureRandom.setSeed() if * the passed in SecureRandom does for its generateSeed() call. * </p> * @param entropySource * @param predictionResistant */ public SP800SecureRandomBuilder(SecureRandom entropySource, bool predictionResistant) { this.mRandom = entropySource; this.mEntropySourceProvider = new BasicEntropySourceProvider(entropySource, predictionResistant); }
public SP800SecureRandomBuilder(SecureRandom entropySource, bool predictionResistant) { mRandom = entropySource; mEntropySourceProvider = new BasicEntropySourceProvider(entropySource, predictionResistant); }
public SP800SecureRandomBuilder(IEntropySourceProvider entropySourceProvider) { mRandom = null; mEntropySourceProvider = entropySourceProvider; }
/// <summary> /// Create a builder which makes creates the SecureRandom objects from a specified entropy source provider. /// <para> /// Note: If this method is used any calls to setSeed() in the resulting SecureRandom will be ignored. /// </para> /// </summary> /// <returns>A new Builder instance.</returns> /// <param name="entropySourceProvider">A provider of EntropySource objects.</param> public IDrbgBuilder <FipsSecureRandom> FromEntropySource(IEntropySourceProvider entropySourceProvider) { return(new Builder(Algorithm, digestAlg, variation, null, entropySourceProvider)); }