Created
August 22, 2017 01:21
-
-
Save SteveSyfuhs/1fb9facb05314ef85325de0bc0911f73 to your computer and use it in GitHub Desktop.
Enclave.NET Client
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var serverCertificate = new Certificate { Thumbprint = "84ee508fb0e1cf7c0075e20a431b6166cffc572f" }; | |
| var client = new EnclaveClient( | |
| FindTestCertificate(), | |
| pinnedCertificates: new[] { | |
| serverCertificate | |
| } | |
| ); | |
| var key = await client.GenerateKey("rsa"); | |
| var encryptedValue = await client.Encrypt(key, new FooBar { foo = "bar" }); | |
| var decrypted = await client.Decrypt<FooBar>(key, encryptedValue.Value); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment