/sodium-encodedecode

Libsodium encoding and decoding functions

Primary LanguageC++

SYNOPSIS

Libsodium encoding and decoding functions.

USAGE

This module is designed to work with the datcxx build tool. To add this module to your project us the following command...

build add datcxx/sodium-encodedecode

TEST

build test

EXAMPLE

#include "deps/datcxx/sodium-encodedecode/index.hxx"

BASE64

auto encoded = Hyper::Sodium::Base64::encode("Hello, world!");
// encoded == "SGVsbG8sIHdvcmxkIQ=="

auto decoded = Hyper::Sodium::Base64::decode(encoded);
// decoded == "Hello, world!"

HEX

auto encoded = Hyper::Sodium::Hex::encode("Hello, world!");
// encoded == "48656c6c6f2c20776f726c6421"

auto decoded = Hyper::Sodium::Hex::decode(encoded);
// decoded == "Hello, world!"