Partager via


3.1.4.6.9 LsarSetSecret2 (Opnum 138)

The LsarSetSecret2 method is invoked to set the current and old values of the secret object.<90>

 NTSTATUS LsarSetSecret2(
   [in] LSAPR_HANDLE SecretHandle,
   [in, unique] PLSAPR_AES_CIPHER_VALUE EncryptedCurrentValue,
   [in, unique] PLSAPR_AES_CIPHER_VALUE EncryptedOldValue
 );

SecretHandle: A handle to an open secret object.

EncryptedCurrentValue: The current value encrypted to specification per AES Cipher Usage (section 5.1.5). It is valid for this parameter to be NULL, in which case the value is deleted from the server's policy database.

EncryptedOldValue: The old value encrypted to specification per AES Cipher Usage (section 5.1.5). It is valid for this parameter to be NULL, in which case the current value in the policy database is copied.

Return Values: The return values are the same as specified for LsarSetSecret (section 3.1.4.6.3).

Processing:

The processing is the same as LsarSetSecret (section 3.1.4.6.3) with the exception that, when non-NULL, the encrypted EncryptedCurrentValue and EncryptedOldValue are first decrypted.