tendermint: github.com/tendermint/tendermint/crypto/xsalsa20symmetric Index | Files

package xsalsa20symmetric

import "github.com/tendermint/tendermint/crypto/xsalsa20symmetric"

Index

Package Files

symmetric.go

func DecryptSymmetric Uses

func DecryptSymmetric(ciphertext []byte, secret []byte) (plaintext []byte, err error)

secret must be 32 bytes long. Use something like Sha256(Bcrypt(passphrase)) The ciphertext is (secretbox.Overhead + 24) bytes longer than the plaintext.

func EncryptSymmetric Uses

func EncryptSymmetric(plaintext []byte, secret []byte) (ciphertext []byte)

secret must be 32 bytes long. Use something like Sha256(Bcrypt(passphrase)) The ciphertext is (secretbox.Overhead + 24) bytes longer than the plaintext.

Package xsalsa20symmetric imports 4 packages (graph) and is imported by 5 packages. Updated 2019-11-18. Refresh now. Tools for package owners.