public void Dispose()
        {
            this.EnsureNotDisposed();

            this.Disposed = true;

            if (this.Handle != IntPtr.Zero)
            {
                WarfaceCryptoApi.Crypto_Release(this.Handle);
                this.Handle = IntPtr.Zero;
            }
        }
        public unsafe void Decrypt(byte[] buffer)
        {
            var pGC = GCHandle.Alloc(buffer, GCHandleType.Pinned);

            try
            {
                WarfaceCryptoApi.Crypto_Decrypt(this.Handle, pGC.AddrOfPinnedObject(), buffer.Length);
            }
            finally
            {
                pGC.Free();
            }
        }
 public WarfaceCryptoProvider(int salt, string version, string key, string iv)
 {
     this.Handle = WarfaceCryptoApi.Crypto_Initialize(salt, version, key, iv);
 }