OTP functionality implemented
This commit is contained in:
@@ -172,6 +172,16 @@ Exports the following functions:
|
||||
- `wget(url, filename='', useragent=None, hdrs={})`: download a file into a local path (returns `(status_code, filename)` tuple)
|
||||
- `wput(url, file_path, field_name="file", method="POST", format="x-www-form-urlencoded", headers={}, useragent=None)`: upload a file from a local path in the `x-www-form-urlencoded` or JSON format (returns `(status_code, content)` tuple)
|
||||
|
||||
### `deck.otp`
|
||||
|
||||
A library that provides HOTP and TOTP one-time password implementations.
|
||||
|
||||
Exports the following functions:
|
||||
|
||||
- `hotp(key, counter, digits=6)`: generate a `digits`-long HOTP code from (bytes-only) key and counter value
|
||||
- `totp(key, time_step, digits=6)`: generate a `digits`-long TOTP code from (bytes-only) key, using `time_step` as the basis (30 seconds is default and the most common)
|
||||
- `get_epoch()`: a helper platform-agnostic function to get the current Unix timestamp in seconds
|
||||
|
||||
### `deck.llm`
|
||||
|
||||
A helper library for interaction with remote LLM (large language model) endpoints that expose OpenAI-compatible API. As of now, it only exports a single class, `LLMChat`, to encapsulate all the interaction.
|
||||
|
||||
Reference in New Issue
Block a user