public AesCryptoProviderTests(ITestOutputHelper output) { using (var aes = Aes.Create()) { aes.GenerateKey(); _iv = aes.IV; var key = Encoding.Unicode.GetString(aes.Key); _keystore = new InsecureKeyStore("mypublickey", "!mysecretkey#9^5"); } _output = output; }
public RsaCryptoProviderTests() { using (var rsa = RSA.Create()) { rsa.KeySize = 2048; var privateKey = rsa.ExportParameters(true); var publicKey = rsa.ExportParameters(false); _keystore = new InsecureKeyStore( new KeyValuePair <string, string>("privateKey", GetKeyAsString(privateKey)), new KeyValuePair <string, string>("publicKey", GetKeyAsString(publicKey))); } }
public RsaCryptoProvider(IKeystoreProvider keyStore) : this() { KeyStore = keyStore; }