| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
OTP.HOTP
Synopsis
- data OTP
- newSHA1Key :: IO AuthenticationKey
- hotpSHA1 :: AuthenticationKey -> Word64 -> Digits -> OTP
- hotpSHA1Check :: AuthenticationKey -> (Word64, Word64) -> Word64 -> Digits -> Text -> Bool
- newSHA256Key :: IO AuthenticationKey
- hotpSHA256 :: AuthenticationKey -> Word64 -> Digits -> OTP
- hotpSHA256Check :: AuthenticationKey -> (Word64, Word64) -> Word64 -> Digits -> Text -> Bool
- newSHA512Key :: IO AuthenticationKey
- hotpSHA512 :: AuthenticationKey -> Word64 -> Digits -> OTP
- hotpSHA512Check :: AuthenticationKey -> (Word64, Word64) -> Word64 -> Digits -> Text -> Bool
Documentation
Since: 3.0.0.0
HMAC-SHA-1
newSHA1Key :: IO AuthenticationKey Source #
Create an new random key to be used with the SHA-1 functions
Since: 3.0.0.0
Arguments
| :: AuthenticationKey | Shared secret |
| -> Word64 | Counter value |
| -> Digits | Number of digits in a password. MUST be 6 digits at a minimum, and possibly 7 and 8 digits. |
| -> OTP | HOTP |
Compute HMAC-Based One-Time Password using secret key and counter value.
Since: 3.0.0.0
Arguments
| :: AuthenticationKey | Shared secret |
| -> (Word64, Word64) | Valid counter range, before and after ideal |
| -> Word64 | Ideal (expected) counter value |
| -> Digits | Number of digits provided |
| -> Text | Digits entered by user |
| -> Bool | True if password is valid |
Check presented password against a valid range.
Since: 3.0.0.0
HMAC-SHA-256
newSHA256Key :: IO AuthenticationKey Source #
Create an new random key to be used with the SHA256 functions
Since: 3.0.0.0
Arguments
| :: AuthenticationKey | Shared secret |
| -> Word64 | Counter value |
| -> Digits | Number of digits in a password. MUST be 6 digits at a minimum, and possibly 7 and 8 digits. |
| -> OTP | HOTP |
Compute HMAC-Based One-Time Password using secret key and counter value.
Since: 3.0.0.0
Arguments
| :: AuthenticationKey | Shared secret |
| -> (Word64, Word64) | Valid counter range, before and after ideal |
| -> Word64 | Ideal (expected) counter value |
| -> Digits | Number of digits provided |
| -> Text | Digits entered by user |
| -> Bool | True if password is valid |
Check presented password against a valid range.
Since: 3.0.0.0
HMAC-SHA-512
newSHA512Key :: IO AuthenticationKey Source #
Create an new random key to be used with the SHA512 functions
Since: 3.0.0.0
Arguments
| :: AuthenticationKey | Shared secret |
| -> Word64 | Counter value |
| -> Digits | Number of digits in a password |
| -> OTP | HOTP |
Compute HMAC-Based One-Time Password using secret key and counter value.
Since: 3.0.0.0