crypto

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Chacha20poly1305 = chacha20poly1305Aead{}
View Source
var Sha256 = sha256Hash{}

Functions

func GetAuth added in v0.3.3

func GetAuth(password []byte) (*auth, error)

func NewConn

func NewConn(c net.Conn, rnonce, wnonce []byte, rciph, wciph cipher.AEAD) net.Conn

NewConn wraps a stream-oriented net.Conn with cipher.

func NewEd25519

func NewEd25519(hash types.Hash, key []byte) types.Signer

func NewHandshaker

func NewHandshaker(server bool, hash []byte, password []byte) *encryptedHandshaker

func NewReader

func NewReader(r io.Reader, nonce []byte, aead cipher.AEAD, maxPayloadSize int) *reader

func NewWriter

func NewWriter(w io.Writer, nonce []byte, aead cipher.AEAD, maxPayloadSize int) *writer

Types

type Ed25519

type Ed25519 struct {
	// contains filtered or unexported fields
}

func (Ed25519) Sign

func (e Ed25519) Sign(rand io.Reader, digest []byte) (signature []byte, err error)

func (Ed25519) SignatureSize

func (Ed25519) SignatureSize() int

func (Ed25519) Verify

func (e Ed25519) Verify(message, sig []byte) bool

Jump to

Keyboard shortcuts

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