Skip to content

Instantly share code, notes, and snippets.

@SteveSyfuhs
Created August 22, 2017 01:21
Show Gist options
  • Select an option

  • Save SteveSyfuhs/1fb9facb05314ef85325de0bc0911f73 to your computer and use it in GitHub Desktop.

Select an option

Save SteveSyfuhs/1fb9facb05314ef85325de0bc0911f73 to your computer and use it in GitHub Desktop.
Enclave.NET Client
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