HTTPSign v0.1.1 HTTPSign.Crypto

Crypto wrapper for signing and verifying messages.

Supported algorithms are: rsa-sha256, hmac-sha256, and ecdsa-sha256.

Link to this section Summary

Link to this section Types

Link to this type algorithm()
algorithm() :: :ecdsa | :hmac | :rsa

Link to this section Functions

Link to this function sign(algo, message, private_key)
sign(algorithm(), binary(), binary()) :: {:ok, binary()} | {:error, binary()}

Sign a message.

Link to this function verify(algo, message, signature, public_key)
verify(algorithm(), binary(), binary(), binary()) ::
  {:ok, binary()} | {:error, binary()}

Verify a signed message.