Example #1
0
File: Prng.cs Project: sothis/libk
 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();
 }
Example #2
0
File: Prng.cs Project: sothis/libk
 internal static extern UIntPtr k_prng_init(PrngKind cipher);