unlockWithSecurityKey - multiple declarations

Function unlockWithSecurityKey

Unlock an opened vault with a connected security key.

credentials.store.CredentialStatus unlockWithSecurityKey(
  credentials.backend.vault.posix_store.EncryptedCredentialVault vault,
  string keyId,
  scope const(credentials.backend.vault.protector.VaultUnlockMethod) method
) @safe;

Restore method from application settings with VaultUnlockMethod.tryParse() and find the connected key with findSecurityKeys() first.

Parameters

NameDescription
vault Locked vault returned by openExisting().
keyId id of the connected key.
method Previously saved unlock method.

Returns

ok when the vault is ready for normal CredentialStore operations.

Examples

auto status = unlockWithSecurityKey(
    vault,
    key.id,
    unlockMethod
);

Function unlockWithSecurityKey

Unlock a vault with a security key and PIN.

credentials.store.CredentialStatus unlockWithSecurityKey(
  credentials.backend.vault.posix_store.EncryptedCredentialVault vault,
  string keyId,
  scope const(credentials.backend.vault.protector.VaultUnlockMethod) method,
  scope ref const(credentials.secret.SecretBuffer) pin
) @safe;

Use this overload when the saved unlock method requires PIN-backed user verification.