public override byte[] CreateKeyExchange(byte[] rgbData) { if (rgbData == null) { throw new ArgumentNullException("rgbData"); } if (rsa == null) { string msg = Locale.GetText("No RSA key specified"); throw new CryptographicUnexpectedOperationException(msg); } if (random == null) { random = RandomNumberGenerator.Create(); // create default } return(PKCS1.Encrypt_v15(rsa, random, rgbData)); }