minvws / libsodium-windows-cli

Libsodium Windows CLI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

COVID-19 LibSodium Windows CLI (NaCLI)

Introduction

This repository contains the NaCLI, a small tool which makes it easy for Windows users to use the encrypt, decrypt and keygen functions from the amazing LibSodium (https://doc.libsodium.org/).

Command line interface

We try to keep the interface simple but flexible enough to be useful. Here's a quick overview; for more options run the tool and read the help :-)

Generate keys:

nacli.exe keygen -O "public.key" -o "private.key"

Example keys are used from now on so you should be able to run these commands as is.

Encrypt with output to the console/std:out encoded as a b64 string:

nacli.exe encrypt -d "hello world" -K "ExampleKeys/public.key" -k "ExampleKeys/private.key" -f b64

Decrypt HEX-encoded data with output to the console/std:out as bytes:

nacli.exe decrypt -e hex -d "096668C9211E00A855FAA74398CC49FC5D4E51EDE1FF38CF5FB9395B3CDA3E2B7102A5419542EDA01AFDBD91682F1698889C798D30FAF21FE9DA39" -K "ExampleKeys/public.key" -k "ExampleKeys/private.key"

Decrypt base64-encoded data with output to the console/std:out:

nacli.exe decrypt -e b64 -d "c8L4ZL2Qkmf8wa9hJCYs9BOFqGjjqHE+E5IQBg5By34Vm8zvzsjWwHLG5S/GLnluGSTOwtHHtbaMfI4=" -K "ExampleKeys/public.key" -k "ExampleKeys/private.key"

Local development setup

Prereqs

Nice to have

  • Visual Studio 2019 with ReSharper

Building

Open the project in your IDE, hit build and then run.

Or if you want to publish, then execute the publishing script:

publish.bat

Development & Contribution process

The development team works on the repository in a private fork (for reasons of compliance with existing processes) and shares its work as often as possible.

If you plan to make non-trivial changes, we recommend to open an issue beforehand where we can discuss your planned changes. This increases the chance that we might be able to use your contribution (or it avoids doing work if there are reasons why we wouldn't be able to use it).

Note that all commits should be signed using a gpg key.

About

Libsodium Windows CLI

License:European Union Public License 1.2


Languages

Language:C# 96.9%Language:Batchfile 3.1%