Authenticator

This module initializes and loads "authenticators", i.e sets of protected keys stored in a folder and belonging to a Key Guardian.

wacryptolib.authenticator.initialize_authenticator(authenticator_dir, keystore_owner, keystore_passphrase_hint)

BEWARE - PRIVATE API FOR NOW

Initialize a specific folder by creating a metadata file in it.

The folder must not be already initialized. It may not exist yet, but its parents must exist.

Parameters:
  • authenticator_dir (Path) -- Folder where the metadata file is expected.

  • keystore_owner (str) -- owner name to store in device.

  • keystore_passphrase_hint (str) -- hint for the passphrase used on private keys.

Return type:

dict

Returns:

(dict) Metadata for this authenticator.

wacryptolib.authenticator.is_authenticator_initialized(authenticator_dir)

BEWARE - PRIVATE API FOR NOW

Check if an authenticator folder SEEMS initialized.

Doesn't actually load the authenticator metadata file, nor check related keypairs.

Parameters:

authenticator_dir (Path) -- (Path) folder where the metadata file is expected.

Returns:

(bool) True if and only if the authenticator seems initialized.