예제 #1
0
파일: Streamcipher.cs 프로젝트: sothis/libk
 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();
 }
예제 #2
0
파일: Blockcipher.cs 프로젝트: sothis/libk
 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();
 }
예제 #3
0
파일: Streamcipher.cs 프로젝트: sothis/libk
 public Streamcipher(BlockcipherKind algorithm, BlockcipherModeKind mode)
     : this(algorithm, mode, 0)
 {
 }
예제 #4
0
파일: Streamcipher.cs 프로젝트: sothis/libk
 internal static extern UIntPtr k_sc_init_with_blockcipher(BlockcipherKind cipher, BlockcipherModeKind mode, UIntPtr max_workers);
예제 #5
0
파일: Blockcipher.cs 프로젝트: sothis/libk
 internal static extern UIntPtr k_bc_init(BlockcipherKind cipher);