Beispiel #1
0
 public Prng(PrngKind algorithm)
 {
     if (UnmanagedError.RegisterThread() != ErrorKind.K_ESUCCESS)
         throw new Exception("unable to register libk error handler");
     if ((context = SafeNativeMethods.k_prng_init(algorithm)) == (UIntPtr)0)
         UnmanagedError.ThrowLastError();
 }
Beispiel #2
0
 internal static extern UIntPtr k_prng_init(PrngKind cipher);