AesGcmPrimitivesCreator Property
AesGcmPrimitivesCreator
This property is a delegate (function pointer). This method will return an instance of IAesGcmPrimitives.
C#
public static Func<IAesGcmPrimitives> AesGcmPrimitivesCreator { get; set; }
Property Value
Type | Description |
---|---|
System.Func<IAesGcmPrimitives> |
Remarks
When an SDK operation needs to perform AES-GCM encrypt or decrypt, it will do so using an implementation of the IAesGcmPrimitives interface. However, when it needs an instance, it will this delegate to build an object, rather than build it itself.
For example:
IAesGcmPrimitives aesGcm = CryptographyProviders.AesGcmPrimitivesCreator();
If you want to replace the implementation, you will likely do something like this in your application. The body of the delegate is responsible for creating an instance of AES-GCM based on an implementation of your own choosing.
CryptographyProviders.AesGcmPrimitivesCreator = () =>
{
Handle aesHandle = GetHandle();
return AesGcmImpl.GetAesGcmObject(aesHandle);
}