Registry / crypto / go-jose-go-jose-v2

go-jose-go-jose-v2

JSON →
library2.6.3gogounverified

Package jose aims to provide an implementation of the Javascript Object Signing and Encryption set of standards.

go get gopkg.in/go-jose/go-jose.v2
INSTALL
IMPORT
SIG · GO-JOSE-GO-JOSE-V2
G
go-jose-go-jose-v2
cryptogov2.6.3
harness data pending
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.

jose
gopkg.in/go-jose/go-jose.v2

Encrypts a message using AES-GCM with a symmetric key.

package main import ( "fmt" jose "gopkg.in/go-jose/go-jose.v2" ) func main() { key := []byte("secret-key-12345") encrypter, err := jose.NewEncrypter(jose.A128GCM, jose.Recipient{Algorithm: jose.A128GCMKW, Key: key}, nil) if err != nil { panic(err) } object, err := encrypter.Encrypt([]byte("hello, world")) if err != nil { panic(err) } fmt.Println(object.FullSerialize()) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
2.6.3latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
go-jose-go-jose-v2 — go get go-jose-go-jose-v2 · libregistry