Пример #1
0
        internal void ImportPublicKeyFromBase64EncodedString(string publicKey)
        {
            byte[] pbData = Convert.FromBase64String(publicKey);
            bool   flag   = PSCryptoNativeUtils.CryptImportKey(this.hProv, pbData, pbData.Length, PSSafeCryptKey.Zero, 0, ref this.hRSAKey);

            this.CheckStatus(flag);
        }
Пример #2
0
        internal void ImportSessionKeyFromBase64EncodedString(string sessionKey)
        {
            byte[] pbData = Convert.FromBase64String(sessionKey);
            bool   flag   = PSCryptoNativeUtils.CryptImportKey(this.hProv, pbData, pbData.Length, this.hRSAKey, 0, ref this.hSessionKey);

            this.CheckStatus(flag);
            this.canEncrypt = true;
        }