hypercore-cxx / sodium-encodedecode

Libsodium encoding and decoding functions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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!"

About

Libsodium encoding and decoding functions


Languages

Language:C++ 86.2%Language:JavaScript 13.8%