Library of common cryptographic algorithms and functions for Pony. Requires LibreSSL or OpenSSL. See installation for more details.
Production ready.
- Install corral
corral add github.com/ponylang/crypto.git --version 1.2.3
corral fetch
to fetch your dependenciesuse "crypto"
to include this packagecorral run -- ponyc
to compile your application
The 0.9.0, 1.1.x, and 3.0.x OpenSSL versions and corresponding compatible LibreSSL library versions are supported.
The default is to use the 0.9.x library APIs. You can change the selected supported library version at compile-time by using Pony's compile time definition functionality.
corral run -- ponyc -Dopenssl_0.9.0
corral run -- ponyc -Dopenssl_1.1.x
corral run -- ponyc -Dopenssl_3.0.x
crypto
requires either LibreSSL or OpenSSL in order to operate. You'll might need to install it within your environment of choice.
sudo apt-get install -y libssl-dev
apk add --update libressl-dev
pacman -S openssl
brew update
brew install libressl
sudo port install libressl
sudo dnf install openssl-devel
sudo yum install openssl-devel
sudo zypper install libopenssl-devel
If you use Corral to include this package as dependency of a project, Corral will download and build LibreSSL for you the first time you run corral fetch
. Otherwise, before using this package, you must run .\make.ps1 libs
in its base directory to download and build LibreSSL for Windows. In both cases, you will need CMake (3.15 or higher) and 7Zip (7z.exe
) in your PATH
; and Visual Studio 2017 or later (or the Visual C++ Build Tools) installed in your system.
You should pass --define openssl_0.9.0
to Ponyc when using this package on Windows.
Examples can be found within the examples folder in this repository