public static void MemUnlock(IntPtr intPtr, long Length) { int TestInt; TestInt = SodiumSecureMemoryLibrary.sodium_munlock(intPtr, Length); if (TestInt == -1) { throw new Exception("Exception: Unlock and MemZero process failed.."); } }