public Streamcipher(StreamcipherKind algorithm, int noncebits) { if (UnmanagedError.RegisterThread() != ErrorKind.K_ESUCCESS) throw new Exception("unable to register libk error handler"); if ((context = SafeNativeMethods.k_sc_init(algorithm, (uint)noncebits)) == (UIntPtr)0) UnmanagedError.ThrowLastError(); }
internal static extern UIntPtr k_sc_init(StreamcipherKind cipher, UInt32 noncebits);