Partager via


EncryptDataWithKeyProtector method of the MSFT_HgsKeyProtectorOperations class

Encrypts data returning the encrypted data along with an egress key protector based on the provided key protector. This is only supported in KDS Local mode.

Syntax

uint32 EncryptDataWithKeyProtector(
  [in]  uint8   BaseKeyProtector[],
  [in]  uint32  UniqueEncryptionIdentifier,
  [in]  uint8   PlaintextData[],
  [in]  boolean RollKeyProtector,
  [out] uint8   EgressKeyProtector[],
  [out] uint8   EncryptedData[]
);

Parameters

BaseKeyProtector [in]

The key protector desired for the data.

UniqueEncryptionIdentifier [in]

A unique encryption identifier that is used only once per key, usually based upon the message type.

PlaintextData [in]

The data to be encrypted.

RollKeyProtector [in]

Determines if BaseKeyProtector is rolled to a new egress key protector.

EgressKeyProtector [out]

The Key Protector derived from the BaseKeyProtector describing the key used to encrypt the data.

EncryptedData [out]

The data encrypted using the key described in EgressKeyProtector.

Requirements

Minimum supported client
Windows 10 [desktop apps only]
Minimum supported server
Windows Server 2016
Namespace
Root\Microsoft\Windows\Hgs
MOF
HgsClientWmi.mof
DLL
HgsClientWmi.dll

See also

MSFT_HgsKeyProtectorOperations