Documentation ¶
Index ¶
- Constants
- func CryptoBox(nonce []byte, plaintext string)
- func CryptoBoxKeypair() (pk [SECRETKEYBYTES]byte, sk [PUBLICKEYBYTES]byte)
- func CryptoOpen(nonce []byte, ciphertext string)
- func IncrementalNonceStrategy() func() []byte
- func RandomNonceStrategy() func() []byte
- func Randombytes(bytes []byte)
- type Session
Constants ¶
View Source
const PUBLICKEYBYTES int = 32
View Source
const SECRETKEYBYTES int = 32
Variables ¶
This section is empty.
Functions ¶
func CryptoBoxKeypair ¶
func CryptoBoxKeypair() (pk [SECRETKEYBYTES]byte, sk [PUBLICKEYBYTES]byte)
func CryptoOpen ¶
func IncrementalNonceStrategy ¶
func IncrementalNonceStrategy() func() []byte
func RandomNonceStrategy ¶
func RandomNonceStrategy() func() []byte
func Randombytes ¶
func Randombytes(bytes []byte)
Types ¶
type Session ¶
type Session struct { // the public key of the agent who is sending you encrypted messages Public [PUBLICKEYBYTES]byte // your secret key Secret [SECRETKEYBYTES]byte // The nonce generator. Nonce func() []byte // contains filtered or unexported fields }
func NewSession ¶
func NewSession(pk [PUBLICKEYBYTES]byte, sk [SECRETKEYBYTES]byte) (s *Session)
func (*Session) Precompute ¶
func (s *Session) Precompute()
Click to show internal directories.
Click to hide internal directories.