Documentation ¶
Overview ¶
Package cryptoutil provides utility functions for cryptographic operations.
Index ¶
- func SignSymmetric(msg []byte, secretKey *[32]byte) ([]byte, error)
- func VerifyAndReadAssymetric(signedMsg []byte, publicKey *[32]byte) ([]byte, error)
- func VerifyAndReadAssymetricBase64(signedMsg Base64, publicKey Base64) ([]byte, error)
- func VerifyAndReadSymmetric(signedMsg []byte, secretKey *[32]byte) ([]byte, error)
- type Base64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SignSymmetric ¶ added in v0.0.12
SignSymmetric signs a message using a symmetric key. It is a convenience wrapper around the nacl/auth package.
func VerifyAndReadAssymetric ¶ added in v0.0.20
VerifyAndReadAssymetric verifies a signed message using a public key and returns the original message. It is a convenience wrapper around the nacl/sign package.
func VerifyAndReadAssymetricBase64 ¶ added in v0.0.57
VerifyAndReadAssymetricBase64 verifies a signed message using a base64 encoded public key and returns the original message. It is a convenience wrapper around the nacl/sign package.
Types ¶
Click to show internal directories.
Click to hide internal directories.