sodium

package module
v0.0.0-...-a267cd7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2021 License: ISC Imports: 3 Imported by: 0

README

!This code requires an independent audit check!

libsodium-go

A binding library made in Go for the popular portable cryptography library Sodium.

Purpose

The goal of this binding library is to make use of Sodium in a more Go friendly matter. And of course making it easier to make secure software.

Team (as of now...)

  • Stephen Chavez (@redragonx)
  • Graham Smith (@neuegram)

Contributors

Silkeh

How to build

For linux, this should be easy since there's pkg-config support. Please make sure libsodium is installed on your system first.

Pre-setup:

  1. Please install Libsodium here https://download.libsodium.org/doc/installation/index.html
  2. sudo ldconfig
  3. sudo apt-get install pkg-config

Install libsodium-go:

  1. go get -d github.com/ffflorian/libsodium-go
  2. cd $GOPATH/src/github.com/ffflorian/libsodium-go
  3. ./build.sh

For Windows, this requires a little more work.

  1. Download and install pkg-config for win32 or win64
  2. Add a system or user variable PKG_CONFIG_PATH pointing to a folder containing pkg-config files, including libsodium
  3. go get -d github.com/ffflorian/libsodium-go
  4. cd %GOPATH%/src/github.com/ffflorian/libsodium-go
  5. build.bat

License

Copyright 2015 - GoKillers

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bin2hex

func Bin2hex(bin []byte) string

func Init

func Init()

func LibraryMinimal

func LibraryMinimal() bool

LibraryMinimal returns true for a minimal build

func LibraryVersionMajor

func LibraryVersionMajor() int

LibraryVersionMajor returns the library major version number

func LibraryVersionMinor

func LibraryVersionMinor() int

LibraryVersionMinor returns the library minor version number

func MemCmp

func MemCmp(buff1, buff2 []byte, length int) int

func MemZero

func MemZero(buff1 []byte)

func RuntimeHasNeon

func RuntimeHasNeon() bool

func RuntimeHasSse2

func RuntimeHasSse2() bool

func RuntimeHasSse3

func RuntimeHasSse3() bool

func VersionString

func VersionString() string

VersionString returns the libsodium version string

Types

This section is empty.

Directories

Path Synopsis
crypto
aead
Package aead contains bindings for authenticated encryption with additional data.
Package aead contains bindings for authenticated encryption with additional data.
aead/aes256gcm
Package aes256gcm contains the libsodium bindings for AES256-GCM.
Package aes256gcm contains the libsodium bindings for AES256-GCM.
aead/chacha20poly1305
Package chacha20poly1305 contains the libsodium bindings for ChaCha20-Poly1305.
Package chacha20poly1305 contains the libsodium bindings for ChaCha20-Poly1305.
aead/chacha20poly1305ietf
Package chacha20poly1305ietf contains the libsodium bindings for the IETF variant of ChaCha20-Poly1305.
Package chacha20poly1305ietf contains the libsodium bindings for the IETF variant of ChaCha20-Poly1305.
aead/xchacha20poly1305ietf
Package xchacha20poly1305ietf contains the libsodium bindings for the IETF variant of XChaCha20-Poly1305.
Package xchacha20poly1305ietf contains the libsodium bindings for the IETF variant of XChaCha20-Poly1305.
Package support implements support functions and errors that are used by by other libsodium-go packages.
Package support implements support functions and errors that are used by by other libsodium-go packages.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL