choonkeat/elm-totp/1.1.0

NOTE: the latest version is 1.1.2

TOTP.Algorithm

Types

= SHA1
| SHA256
| SHA512

https://github.com/google/google-authenticator/wiki/Key-Uri-Format#algorithm

Currently, the algorithm parameter is ignored by the Google Authenticator implementations.

Default is SHA1

Helper functions

digestBytes : Algorithm -> Bytes -> Bytes -> List Int

We need this function to route calls between underlying libraries

because ktonon/elm-crypto does not support SHA1

fromString : String -> Maybe Algorithm

Function to resolve the Algorithm from a String value.

This is useful when working with HTML inputs, allowing users to choose which algorithm to use.

toString : Algorithm -> String

String representation of Algorithm value