예제 #1
0
        public CtVerifier(byte[] publicKey)
        {
            var key = DecodeSubjectPublicKeyInfo(publicKey);

            _key = key ?? throw new ArgumentException("Could not decode public key.", nameof(publicKey));
            using (var sha = new SHA256Cng())
            {
                LogId = sha.ComputeHash(publicKey);
            }
        }
예제 #2
0
 public CtVerifier(byte[] publicKey)
 {
     var key = DecodeSubjectPublicKeyInfo(publicKey);
     if (key == null)
     {
         throw new ArgumentException("Could not decode public key.", nameof(publicKey));
     }
     _key = key;
     using (var sha = new SHA256Cng())
     {
         LogId = sha.ComputeHash(publicKey);
     }
 }