Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 622 Bytes

File metadata and controls

37 lines (26 loc) · 622 Bytes

sodium

Solod bindings for Sodium, a modern, easy-to-use library for encryption, decryption, signatures and password hashing.

Usage

  1. Install libsodium for your operating system.

  2. Install the Solod bindings.

go get solod.dev/sodium@latest
  1. Use it in your code.
package main

import (
	"solod.dev/so/fmt"
	"solod.dev/so/os"
	"solod.dev/sodium/libsodium"
)

func main() {
	if libsodium.Init() < 0 {
		fmt.Println("libsodium could not be initialized")
		os.Exit(1)
	}
	fmt.Println("libsodium is ready")
}

Examples

String hash