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(); }
internal static extern UIntPtr k_prng_init(PrngKind cipher);