示例#1
0
        public byte[] DecryptWithPrivate(CryptoRequest cryptoRequest)
        {
            var bytes64    = cryptoRequest.Data64;
            var privateKey = cryptoRequest.Password;

            byte[] bytes = Convert.FromBase64String(bytes64);

            Chilkat.Rsa rsaEncryptor = new Chilkat.Rsa
            {
                EncodingMode = "hex"
            };

            rsaEncryptor.ImportPrivateKey(privateKey);

            return(rsaEncryptor.DecryptBytes(bytes, usePrivateKey: true));
        }