Registry / crypto / square-go-jose-v2

square-go-jose-v2

JSON →
library2.6.0gogounverified

Package jose provides an implementation of the Javascript Object Signing and Encryption set of standards.

go get gopkg.in/square/go-jose.v2
INSTALL
IMPORT
SIG · SQUARE-GO-JOSE-V2
S
square-go-jose-v2
cryptogov2.6.0
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/square/go-jose.v2

Encrypt a message using JWE with AES-GCM

package main import ( "fmt" "gopkg.in/square/go-jose.v2" ) func main() { key := []byte("secret-32-byte-key-1234567890abcdef") encrypter, err := jose.NewEncrypter(jose.A256GCM, jose.Recipient{Algorithm: jose.A256GCMKW, 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.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

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