Skip to main content

Module should_regenerate

EnumsΒ§

KeyPairCheckResult πŸ”’

FunctionsΒ§

check_key_pair πŸ”’
Returns whether the key pair is valid, needs regeneration, or requires a cipher-based user key check to decide.
internal_should_regenerate_public_key_encryption_key_pair πŸ”’
Checks whether the user’s public key encryption key pair needs regeneration.
internal_should_regenerate_public_key_encryption_key_pair_with_ciphers πŸ”’
Checks whether the user’s public key encryption key pair needs regeneration.
is_user_key_valid πŸ”’
Validates the user key by attempting to decrypt a personal cipher. Returns Ok(true) (should regenerate) if the user key is valid, Ok(false) otherwise.
is_user_key_valid_from_api πŸ”’
Validates the user key by fetching ciphers from the API and attempting to decrypt a personal one. Returns Ok(true) (should regenerate) if the user key is valid, Ok(false) otherwise.
verify_public_key_matches πŸ”’
Verifies that the public key derived from the decrypted private key matches the public key stored on the server.