Plug v1.2.0 Plug.Crypto.MessageVerifier

MessageVerifier makes it easy to generate and verify messages which are signed to prevent tampering.

For example, the cookie store uses this verifier to send data to the client. The data can be read by the client, but cannot be tampered with.

Summary

Functions

Signs a message according to the given secret

Decodes and verifies the encoded binary was not tampared with

Functions

sign(message, secret, digest_type \\ :sha256)

Signs a message according to the given secret.

verify(signed, secret)

Decodes and verifies the encoded binary was not tampared with.