예제 #1
0
        public byte[] GenerateSignature(string idType, string id, byte[] digest, HashAlgorithmType hashAlgorithm)
        {
            RsaCapiKey key = this.GetKey(PrivateKeyInformation.GetIdentity(id, idType));

            return(key.SignDigestValue(digest, hashAlgorithm));
        }
예제 #2
0
        public byte[] Decrypt(string idType, string id, byte[] encryptedData, bool usePadding)
        {
            RsaCapiKey key = this.GetKey(PrivateKeyInformation.GetIdentity(id, idType));

            return(key.Decrypt(encryptedData, usePadding));
        }