util

package
v0.0.0-...-9c37315 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2021 License: MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesKey

func AesKey(salt [8]byte, passwd string) ([]byte, error)

func Decrypt

func Decrypt(key []byte, cipherTxt []byte) (plainTxt []byte, err error)

func Decrypt2

func Decrypt2(stream cipher.Stream, cipherTxt []byte) (plainTxt []byte)

func Encrypt

func Encrypt(key []byte, plainTxt []byte) ([]byte, error)

func Encrypt2

func Encrypt2(stream cipher.Stream, plainTxt []byte) (cipherTxt []byte)

func NewDecStream

func NewDecStream(key []byte) (stream cipher.Stream, iv [aes.BlockSize]byte, err error)

func NewDecStreamWithIv

func NewDecStreamWithIv(key []byte, iv [aes.BlockSize]byte) (stream cipher.Stream, err error)

func NewEncStream

func NewEncStream(key []byte) (stream cipher.Stream, iv [aes.BlockSize]byte, err error)

func NewEncStreamWithIv

func NewEncStreamWithIv(key []byte, iv [aes.BlockSize]byte) (stream cipher.Stream, err error)

func PrivateKeyToCurve25519

func PrivateKeyToCurve25519(curve25519Private *[32]byte, privateKey *[64]byte)

func PublicKeyToCurve25519

func PublicKeyToCurve25519(curve25519Public *[32]byte, publicKey *[32]byte) bool

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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