Goedel.Cryptography.Jose.JoseWebEncryption.Decrypt C# (CSharp) Method

Decrypt() public method

Decrypt the content using the corresponding private key in the local key store (if found). Throws exception otherwise.
public Decrypt ( ) : byte[]
return byte[]
        public byte[] Decrypt() {
            return Decrypt(null);
            }

Same methods

JoseWebEncryption::Decrypt ( KeyPair DecryptionKey ) : byte[]

Usage Example

        public void JoseWebEncryptionTest() {

            var Plaintext = CryptoCatalog.GetBytes(2000);

            var Encrypted = new JoseWebEncryption(Plaintext);
            var Recovered = Encrypted.Decrypt();

            Trace.AssertEqual("Check Testvector", Plaintext, Recovered);
            }