Awesome Open Source
Awesome Open Source

nim-libsodium

Nim wrapper for the libsodium library

image:https://travis-ci.org/FedericoCeratto/nim-libsodium.svg?branch=master["Build Status", link="https://travis-ci.org/FedericoCeratto/nim-libsodium"] image:https://img.shields.io/badge/status-beta-orange.svg[badge] image:https://img.shields.io/github/tag/FedericoCeratto/nim-libsodium.svg[tags] image:https://img.shields.io/badge/License-MPL%20v2.0-blue.svg[License]

WARNING: This library is under development and has not been reviewed by 3rd parties

Features

  • Wrap libsodium and expose only memory-safe entities
  • Follow libsodium naming convention for most functions
  • Tested on Linux
  • Basic unit tests
  • No homemade crypto

Usage

Refer to the link:https://download.libsodium.org/doc/index.html[official libsodium documentation]

and the http://federicoceratto.github.io/nim-libsodium/0.4.1/theindex.html[module documentation]

[source,bash]

sudo apt-get install libsodium18 nimble install libsodium

[source,nim]

import libsodium.sodium import libsodium.sodium_sizes

let msg = "hello and goodbye" (pk, sk) = crypto_box_keypair() nonce = randombytes(crypto_box_NONCEBYTES()) ciphertext = crypto_box_easy(msg, nonce, pk, sk)


Contributing

Testing and PRs are welcome.


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
security (1,944
library (1,349
cryptography (411
wrapper (236
nim (195
libsodium (34
nim-lang (20