Share via


XmlKeyManager.CreateNewKey(DateTimeOffset, DateTimeOffset) Method

Definition

Creates a new key with the specified activation and expiration dates and persists the new key to the underlying repository.

public:
 virtual Microsoft::AspNetCore::DataProtection::KeyManagement::IKey ^ CreateNewKey(DateTimeOffset activationDate, DateTimeOffset expirationDate);
public Microsoft.AspNetCore.DataProtection.KeyManagement.IKey CreateNewKey (DateTimeOffset activationDate, DateTimeOffset expirationDate);
abstract member CreateNewKey : DateTimeOffset * DateTimeOffset -> Microsoft.AspNetCore.DataProtection.KeyManagement.IKey
override this.CreateNewKey : DateTimeOffset * DateTimeOffset -> Microsoft.AspNetCore.DataProtection.KeyManagement.IKey
Public Function CreateNewKey (activationDate As DateTimeOffset, expirationDate As DateTimeOffset) As IKey

Parameters

activationDate
DateTimeOffset

The date on which encryptions to this key may begin.

expirationDate
DateTimeOffset

The date after which encryptions to this key may no longer take place.

Returns

The newly-created IKey instance.

Implements

Applies to