The elixir implementation of a simple, opinionated library for encrypting small packets of data securely. Designed for exchanging tokens among systems written in a variety of programming languages:
Send:
# Try `head /dev/urandom | shasum -a 256` to make a decent 256-bit key
master_key = "64-char-hex"
sender = SimpleSecrets.init(master_key)
{:ok, packet} = SimpleSecrets.pack("this is a secret message", sender)
IO.inspect(packet)
# <<"bBDTl5NKdpvMfriRElbbOw0WEsENjbvv7mqK4"...>>
Receive:
master_key = "shared-key-hex"
sender = SimpleSecrets.init(master_key)
# Read data from somewhere
packet = <<"bBDTl5NKdpvMfriRElbbOw0WEsENjbvv7mqK4"...>>
{:ok, message} = SimpleSecrets.unpack(packet, sender)
IO.inspect(message)
# "this is a secret message"
No. Seriously. But we might replace what we have with what you suggest. We want exactly one, well-worn path. If you have improvements, we want them. If you want alternatives to choose from you should probably keep looking.
MIT.