private static byte[] AddEncryptedKeyAndIv(byte[] exponent, byte[] modulus, AesManaged aesKeyGen) { var rsa = new RSA.RSACrypto(); rsa.ImportParameters(new RSA.RSAParameters { E = exponent, N = modulus }); return(rsa.Encrypt(aesKeyGen.Key.Concat(aesKeyGen.IV).ToArray())); }
private static byte[] AddEncryptedKeyAndIv(Tuple <byte[], byte[]> parameters, AesManaged aesKeyGen) { var rsa = new RSA.RSACrypto(); rsa.ImportParameters(new RSA.RSAParameters { E = parameters.Item1, N = parameters.Item2 }); return(rsa.Encrypt(aesKeyGen.Key.Concat(aesKeyGen.IV).ToArray())); }
private static byte[] AddEncryptedKeyAndIv(Tuple<byte[], byte[]> parameters, AesManaged aesKeyGen) { var rsa = new RSA.RSACrypto(); rsa.ImportParameters(new RSA.RSAParameters { E = parameters.Item1, N = parameters.Item2 }); return rsa.Encrypt(aesKeyGen.Key.Concat(aesKeyGen.IV).ToArray()); }
private static byte[] AddEncryptedKeyAndIv(byte[] exponent, byte[] modulus, AesManaged aesKeyGen) { var rsa = new RSA.RSACrypto(); rsa.ImportParameters(new RSA.RSAParameters { E = exponent, N = modulus }); return rsa.Encrypt(aesKeyGen.Key.Concat(aesKeyGen.IV).ToArray()); }