internal RsaPkcs1SignatureKey( SafeCryptoKeyHandle keyHandle, string algorithmName, string hashAlg) : base(keyHandle, algorithmName) { HashAlgorithm = new SubtleHashAlgorithm(hashAlg); }
internal HmacKey( SafeCryptoKeyHandle keyHandle, string algorithmName, int outputLength) : base(keyHandle) { DigestAlgorithm = new SubtleHashAlgorithm(algorithmName); OutputLength = outputLength; }
public Task <RsaPkcs1SignatureKey> CreateRsaPkcs1SignatureKey( int keySize, SubtleHashAlgorithm hashAlgorithm) { if (keySize < 1024) { throw new ArgumentOutOfRangeException(nameof(keySize)); } hashAlgorithm.Validate(nameof(hashAlgorithm)); return(GenerateRsaKeyAsync( keySize, "RSASSA-PKCS1-v1_5", hashAlgorithm.Name, true, (handle, alg, hashAlg) => new RsaPkcs1SignatureKey(handle, alg, hashAlg))); }