Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
siv
✓ github.com/ericlagergren/siv
Encrypts data using AES-256-GCM-SIV.
package main
import (
"fmt"
"github.com/ericlagergren/siv"
)
func main() {
key := make([]byte, 32)
cipher, err := siv.NewAES256SIV(key)
if err != nil {
panic(err)
}
plaintext := []byte("Hello, world!")
nonce := make([]byte, 12)
ciphertext, err := cipher.Seal(nil, nonce, plaintext, nil)
if err != nil {
panic(err)
}
fmt.Printf("Ciphertext: %x\n", ciphertext)
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.0.0-20220507050439-0b757b3aa5f1latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.