encode/decode library for janet
Add to your project.janet
file
{:dependencies ["https://github.com/joy-framework/codec"]}
(import codec)
(= "hello there!" (codec/decode (codec/encode "hello there!")))
Codec can also perform sha1 hmac digests on strings
(import codec)
(codec/hmac-sha1 "secret token" "hello world")
This should be equivalent to the following ruby code:
OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha1'), 'secret token', 'hello world')