ykman.otp
Attributes
Functions
|
Check if the OTP application of a FIPS YubiKey is in FIPS approved mode. |
|
Generate a random password. |
|
Parse a secret key encoded as either Hex or Base32. |
|
Format an OATH code from a hash response. |
|
Format a HMAC-SHA1 challenge based on an OATH timestamp and period. |
|
Produce a CSV line in the "Yubico" format. |
Module Contents
- ykman.otp.is_in_fips_mode(session)[source]
Check if the OTP application of a FIPS YubiKey is in FIPS approved mode.
- Parameters:
session (yubikit.yubiotp.YubiOtpSession) – The YubiOTP session.
- Return type:
- ykman.otp.DEFAULT_PW_CHAR_BLOCKLIST
- ykman.otp.generate_static_pw(length, keyboard_layout=KEYBOARD_LAYOUT.MODHEX, blocklist=DEFAULT_PW_CHAR_BLOCKLIST)[source]
Generate a random password.
- Parameters:
length (int) – The length of the password.
keyboard_layout (ykman.scancodes.KEYBOARD_LAYOUT) – The keyboard layout.
blocklist (Iterable[str]) – The list of characters to block.
- Return type:
- ykman.otp.time_challenge(timestamp, period=30)[source]
Format a HMAC-SHA1 challenge based on an OATH timestamp and period.