public Streamcipher(BlockcipherKind algorithm, BlockcipherModeKind mode, int max_workers) { if (UnmanagedError.RegisterThread() != ErrorKind.K_ESUCCESS) throw new Exception("unable to register libk error handler"); if ((context = SafeNativeMethods.k_sc_init_with_blockcipher(algorithm, mode, (UIntPtr)max_workers)) == (UIntPtr)0) UnmanagedError.ThrowLastError(); }
public Blockcipher(BlockcipherKind algorithm) { if (UnmanagedError.RegisterThread() != ErrorKind.K_ESUCCESS) throw new Exception("unable to register libk error handler"); if ((context = SafeNativeMethods.k_bc_init(algorithm)) == (UIntPtr)0) UnmanagedError.ThrowLastError(); }
public Streamcipher(BlockcipherKind algorithm, BlockcipherModeKind mode) : this(algorithm, mode, 0) { }
internal static extern UIntPtr k_sc_init_with_blockcipher(BlockcipherKind cipher, BlockcipherModeKind mode, UIntPtr max_workers);
internal static extern UIntPtr k_bc_init(BlockcipherKind cipher);