internal HMacDRBGProvider(FipsDigestAlgorithm algorithm, byte[] nonce, byte[] personalizationString, int securityStrength, byte[] primaryAdditionalInput) { CryptoStatus.IsReady(); this.hMac = FipsShs.CreateHmac(algorithm); this.nonce = nonce; this.personalizationString = personalizationString; this.securityStrength = securityStrength; this.primaryAdditionalInput = primaryAdditionalInput; }
public CTRDRBGProvider(Org.BouncyCastle.Crypto.Internal.IBlockCipher blockCipher, int keySizeInBits, byte[] nonce, byte[] personalizationString, int securityStrength, byte[] primaryAdditionalInput) { CryptoStatus.IsReady(); this.blockCipher = blockCipher; this.keySizeInBits = keySizeInBits; this.nonce = nonce; this.personalizationString = personalizationString; this.securityStrength = securityStrength; this.primaryAdditionalInput = primaryAdditionalInput; }
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; }
internal GeneralBlockCipherProvider(string name, IEngineProvider <Internal.IBlockCipher> engineProvider) { CryptoStatus.IsReady(); if (CryptoServicesRegistrar.IsInApprovedOnlyMode()) { throw new CryptoUnapprovedOperationError("Attempt to create provider for unapproved algorithm in approved only mode"); } this.name = name; this.engineProvider = engineProvider; }
internal A CreateBuilder <A>(IBuilderServiceType <A> type) { CryptoStatus.IsReady(); return((type as IBuilderService <A>).GetFunc(this).Invoke(type as IParameters <Algorithm>)); }
internal A CreateGenerator <A>(IGenerationServiceType <A> type, SecureRandom random) { CryptoStatus.IsReady(); return((type as IGenerationService <A>).GetFunc(this).Invoke(type as IParameters <Algorithm>, random)); }
internal A CreateService <A>(ICryptoServiceType <A> type, IAsymmetricKey key, SecureRandom random) { CryptoStatus.IsReady(); return((type as IServiceProvider <A>).GetFunc(this).Invoke(new KeyWithRandom(key, random))); }
internal A CreateService <A>(ICryptoServiceType <A> type, IAsymmetricKey key) { CryptoStatus.IsReady(); return((type as IServiceProvider <A>).GetFunc(this).Invoke(key)); }
internal A CreateService <A>(ICryptoServiceType <A> type) { CryptoStatus.IsReady(); return((type as IServiceProvider <A>).GetFunc(this).Invoke((IKey)type)); }