extras v0.1.2 String.Extra

Link to this section Summary

Functions

HMAC-SHA1, e.g. suitable for Twitter OAuth

Random alphanumeric string of n length

url safe, strong-random hash

random numeric string

SHA1 hash

Link to this section Functions

Link to this function hmac_sha1(key, string)

HMAC-SHA1, e.g. suitable for Twitter OAuth

Link to this function random_alphanumeric(length \\ 8)

Random alphanumeric string of n length

Link to this function random_hash(length \\ 8)

url safe, strong-random hash

Link to this function random_numeric(length \\ 8)

random numeric string

SHA1 hash

Example:

iex> String.Extra.sha1("hello world")
"Kq5sNclPz7QV2-lfQIuc6R7oRu0="