示例#1
0
 public override void SetHashAlgorithm(string name)
 {
     if (name == null)
     {
         throw new ArgumentNullException(nameof(name));
     }
     hashAlgorithmName = EcUtils.GetHashAlgorithmName(name);
 }
示例#2
0
        public override AsymmetricSignatureFormatter GetSignatureFormatter(string algorithm)
        {
            if (algorithm == null)
            {
                throw new ArgumentNullException(nameof(algorithm));
            }
            HashAlgorithmName hashAlgorithmName = EcUtils.GetHashAlgorithmName(algorithm);

            return(new EcSignatureFormatter(ecDsa, hashAlgorithmName));
        }
示例#3
0
 public bool Matches(ECParameters other)
 {
     return(EcUtils.ParametersEqual(Parameters, other));
 }
示例#4
0
 public override void SetKey(AsymmetricAlgorithm key)
 {
     ecDsa = EcUtils.ValidateEcDsaKey(key);
 }
示例#5
0
 public override void SetHashAlgorithm(string name)
 {
     hashAlgorithmName = EcUtils.GetHashAlgorithmName(name);
 }