Exemplo n.º 1
0
 public override void SetHashAlgorithm(string name)
 {
     if (name == null)
     {
         throw new ArgumentNullException(nameof(name));
     }
     hashAlgorithmName = EcUtils.GetHashAlgorithmName(name);
 }
Exemplo n.º 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));
        }
Exemplo n.º 3
0
 public override void SetKey(AsymmetricAlgorithm key)
 {
     ecDsa = EcUtils.ValidateEcDsaKey(key);
 }
Exemplo n.º 4
0
 public bool Matches(ECParameters other)
 {
     return(EcUtils.ParametersEqual(Parameters, other));
 }
Exemplo n.º 5
0
 public override void SetHashAlgorithm(string name)
 {
     hashAlgorithmName = EcUtils.GetHashAlgorithmName(name);
 }