aws_erin v0.2.0 AwsErin.Util View Source

Documentation for Util.

Link to this section Summary

Functions

Get configuration value for :aws_erin's application.

Generate SHA256 hash value.

Encode to Base 16 value with lower case.

Generate HMAC-SHA256 hash value.

Link to this section Functions

Get configuration value for :aws_erin's application.

Link to this function

get_region_name(options)

View Source

Generate SHA256 hash value.

Examples

iex> AwsErin.Util.hash("erin")
<<124, 188, 203, 12, 76, 170, 223, 159, 205, 181, 30, 228, 87, 168, 40, 204,
  114, 164, 88, 121, 131, 27, 91, 151, 138, 226, 226, 206, 252, 68, 151, 5>>

Encode to Base 16 value with lower case.

Examples

iex> AwsErin.Util.hex_encode("erin")
"6572696e"

Generate HMAC-SHA256 hash value.

Examples

iex> AwsErin.Util.hmac("secret", "erin")
<<66, 116, 70, 47, 123, 250, 150, 31, 51, 11, 16, 118, 149, 254, 106, 254, 89,
  65, 153, 52, 185, 191, 44, 50, 250, 254, 55, 172, 101, 31, 249, 250>>