Documentation ¶
Index ¶
- Constants
- func Decrypt(key *LocalKey, input string, f, i []byte) ([]byte, error)
- func Encrypt(r io.Reader, key *LocalKey, m, f, i []byte) (string, error)
- func Sign(m []byte, sk ed25519.PrivateKey, f, i []byte) (string, error)
- func Verify(t string, pk ed25519.PublicKey, f, i []byte) ([]byte, error)
- type LocalKey
Constants ¶
View Source
const ( LocalPrefix = "v4.local." PublicPrefix = "v4.public." )
View Source
const (
// KeyLength is the requested encryption key size.
KeyLength = 32
)
Variables ¶
This section is empty.
Functions ¶
func Decrypt ¶
PASETO v4 symmetric decryption primitive https://github.com/paseto-standard/paseto-spec/blob/master/docs/01-Protocol-Versions/Version4.md#decrypt
func Encrypt ¶
PASETO v4 symmetric encryption primitive. https://github.com/paseto-standard/paseto-spec/blob/master/docs/01-Protocol-Versions/Version4.md#encrypt
func Sign ¶
Sign a message (m) with the private key (sk). PASETO v4 public signature primitive. https://github.com/paseto-standard/paseto-spec/blob/master/docs/01-Protocol-Versions/Version4.md#sign
Types ¶
type LocalKey ¶
type LocalKey [32]byte
LocalKey represents a key for symetric encryption (local).
func GenerateLocalKey ¶
GenerateLocalKey generates a key for local encryption.
func LocalKeyFromSeed ¶
LocalKeyFromSeed creates a local key from given input data.
Click to show internal directories.
Click to hide internal directories.