Class SecureArrayCall
Call used by SecureArray to secure the array.
Inheritance
Inherited Members
Namespace: Isopoh.Cryptography.SecureArray
Assembly: Isopoh.Cryptography.SecureArray.dll
Syntax
public class SecureArrayCall
Constructors
| Improve this Doc View SourceSecureArrayCall(Action<IntPtr, UIntPtr>, Func<IntPtr, UIntPtr, String>, Action<IntPtr, UIntPtr>, String)
Initializes a new instance of the SecureArrayCall class.
Declaration
public SecureArrayCall(Action<IntPtr, nuint> zeroMemory, Func<IntPtr, nuint, string> lockMemory, Action<IntPtr, nuint> unlockMemory, string os)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.IntPtr, System.UIntPtr> | zeroMemory | Call that zeroes memory in a way that does not get optimized away. |
System.Func<System.IntPtr, System.UIntPtr, System.String> | lockMemory | Call that locks the given memory so it doesn't get swapped out to disk. |
System.Action<System.IntPtr, System.UIntPtr> | unlockMemory | Call that unlocks memory previously locked by a call to |
System.String | os | The name of the operating system this SecureArrayCall is for. |
Properties
| Improve this Doc View SourceLockMemory
Gets or sets a method that locks the given memory so it doesn't get swapped out to disk.
Declaration
public Func<IntPtr, nuint, string> LockMemory { get; protected set; }
Property Value
Type | Description |
---|---|
System.Func<System.IntPtr, System.UIntPtr, System.String> | Null on success; otherwise an error message. |
Os
Gets or sets the operating system this SecureArrayCall works for.
Declaration
public string Os { get; set; }
Property Value
Type | Description |
---|---|
System.String |
UnlockMemory
Gets or sets a method that unlocks memory previously locked by a call to LockMemory.
Declaration
public Action<IntPtr, nuint> UnlockMemory { get; protected set; }
Property Value
Type | Description |
---|---|
System.Action<System.IntPtr, System.UIntPtr> |
ZeroMemory
Gets or sets a method that zeroes memory in a way that does not get optimized away.
Declaration
public Action<IntPtr, nuint> ZeroMemory { get; protected set; }
Property Value
Type | Description |
---|---|
System.Action<System.IntPtr, System.UIntPtr> |
Remarks
On Linux, OSX, and UWP, simply calls memset() and hopes the P/Invoke mechanism does not have special handling for memset calls (and thus does not even think about optimizing the call away).