1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
- using System;
- using Org.BouncyCastle.Security;
- namespace Org.BouncyCastle.Crypto
- {
-
- public class KeyGenerationParameters
- {
- private SecureRandom random;
- private int strength;
-
- public KeyGenerationParameters(
- SecureRandom random,
- int strength)
- {
- if (random == null)
- throw new ArgumentNullException("random");
- if (strength < 1)
- throw new ArgumentException("strength must be a positive value", "strength");
- this.random = random;
- this.strength = strength;
- }
-
- public SecureRandom Random
- {
- get { return random; }
- }
-
- public int Strength
- {
- get { return strength; }
- }
- }
- }
- #endif
|