예제 #1
0
파일: Random.cs 프로젝트: LunarLanding/ngit
		public Random()
		{
			// We hope that 'new SecureRandom()' will use NativePRNG algorithm
			// on Sun's Java5 for GNU/Linux and Solaris.
			// It seems NativePRNG refers to /dev/urandom and it must not be blocked,
			// but NativePRNG is slower than SHA1PRNG ;-<
			// TIPS: By adding option '-Djava.security.egd=file:/dev/./urandom'
			//       SHA1PRNG will be used instead of NativePRNG.
			// On MacOSX, 'new SecureRandom()' will use NativePRNG algorithm and
			// it is also slower than SHA1PRNG.
			// On Windows, 'new SecureRandom()' will use SHA1PRNG algorithm.
			random = new SecureRandom();
		}
예제 #2
0
 public virtual void Initialize(int keySize, SecureRandom random)
 {
     throw new NotSupportedException ();
 }
예제 #3
0
 public override void Initialize(int keySize, SecureRandom random)
 {
     this.keySize = keySize;
 }