SafeCryptoApiBlobContext provides a SafeHandle class for an CRYPTOAPI_BLOB structure. This can be used instead of the raw IntPtr to avoid races with the garbage collector, ensuring that the CRYPTOAPI_BLOB object is not cleaned up from underneath you while you are still using the handle pointer.
This safe handle type represents a native CRYPTOAPI_BLOB.
A SafeCryptoApiBlobContext for a Wincrypt.CRYPTOAPI_BLOB can be obtained by calling the GetSafeContext method.
public sealed class SafeCryptoApiBlobContext : SafeHandleZeroOrMinusOneIsInvalidPublic NotInheritable Class SafeCryptoApiBlobContext
Inherits SafeHandleZeroOrMinusOneIsInvalidpublic ref class SafeCryptoApiBlobContext sealed : public SafeHandleZeroOrMinusOneIsInvalid[<SealedAttribute>]
type SafeCryptoApiBlobContext =
class
inherit SafeHandleZeroOrMinusOneIsInvalid
end| IsClosed | (Inherited from SafeHandle) |
| IsInvalid | (Inherited from SafeHandleZeroOrMinusOneIsInvalid) |
| Close | (Inherited from SafeHandle) |
| DangerousAddRef | (Inherited from SafeHandle) |
| DangerousGetHandle | (Inherited from SafeHandle) |
| DangerousRelease | (Inherited from SafeHandle) |
| Dispose | (Inherited from SafeHandle) |
| Equals | (Inherited from Object) |
| GetHashCode | (Inherited from Object) |
| GetType | (Inherited from Object) |
| SetHandleAsInvalid | (Inherited from SafeHandle) |
| ToString | (Inherited from Object) |
| SecurityPermission | The immediate caller must have SecurityPermission/UnmanagedCode to use this type. |