Documentation ¶
Index ¶
- func Decrypt(key []byte, data []byte, nonce []byte) ([]byte, error)
- func DecryptAESCBC(key []byte, data []byte) []byte
- func Encrypt(key []byte, data []byte) ([]byte, []byte, error)
- func EncryptAESCBC(key []byte, data []byte) []byte
- func HashSHA256(bytes []byte) []byte
- func Open(key []byte, box EncryptedBox) []byte
- func RandomBytes(length int) []byte
- func Sign(key *ecdsa.PrivateKey, data []byte) []byte
- func Verify(key *ecdsa.PublicKey, data []byte, signature []byte) bool
- type ECDHKey
- type EncryptedBox
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptAESCBC ¶
func EncryptAESCBC ¶
func HashSHA256 ¶
func Open ¶
func Open(key []byte, box EncryptedBox) []byte
func RandomBytes ¶
Types ¶
type ECDHKey ¶
Note: This should be replaced once crypto/ecdh gets released (Go 1.20?)
func GenerateECDHKey ¶
func GenerateECDHKey() *ECDHKey
func (*ECDHKey) PublicKeyBytes ¶
type EncryptedBox ¶
func Seal ¶
func Seal(key []byte, data []byte) EncryptedBox
Click to show internal directories.
Click to hide internal directories.