Exemple #1
0
 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();
 }
Exemple #2
0
 internal static extern UIntPtr k_sc_init(StreamcipherKind cipher, UInt32 noncebits);