ProtectKeyWithPassphrase method of the Win32_EncryptableVolume class
The ProtectKeyWithPassphrase method of the Win32_EncryptableVolume class uses the passphrase to obtain the derived key. After the derived key is calculated, the derived key is used to secure the encrypted volume's master key.
Syntax
uint32 ProtectKeyWithPassphrase(
[in, optional] string FriendlyName,
[in] string Passphrase,
[out] string VolumeKeyProtectorID
);
Parameters
-
FriendlyName [in, optional]
-
Type: string
A string that specifies a user-assigned string identifier for this key protector. If this parameter is not specified, a blank value is used.
-
Passphrase [in]
-
Type: string
A string that specifies the passphrase.
-
VolumeKeyProtectorID [out]
-
Type: string
A string that uniquely identifies the created key protector.
If the drive supports hardware encryption and BitLocker has not taken band ownership, the ID string is set to "BitLocker" and the key protector is written to per band metadata.
Return value
Type: uint32
This method returns one of the following codes or another error code if it fails.
Return code/value | Description |
---|---|
|
The method was successful. |
|
BitLocker Drive Encryption can only be used for recovery purposes when used in Safe Mode. |
|
Group policy does not permit the creation of a passphrase. |
|
The group policy setting that requires FIPS compliance prevented the passphrase from being generated or used. |
|
The passphrase provided does not meet the minimum or maximum length requirements. |
|
The passphrase does not meet the complexity requirements set by the administrator in group policy. |
|
The volume is already locked by BitLocker Drive Encryption. You must unlock the drive from Control Panel. |
|
The control block for the encrypted volume was updated by another thread. |
|
The key protector is not supported by the version of BitLocker Drive Encryption currently on the volume. |
|
The passphrase cannot be added to the operating system volume. |
|
The provided key protector already exists on this volume. |
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows 7 Enterprise, Windows 7 Ultimate [desktop apps only] |
Minimum supported server |
Windows Server 2008 R2 [desktop apps only] |
Namespace |
Root\CIMV2\Security\MicrosoftVolumeEncryption |
MOF |
|
See also