Registry / crypto / square-go-jose-v1

square-go-jose-v1

JSON →
library1.1.2gogounverified

Package jose implements the Javascript Object Signing and Encryption (JOSE) standards for JSON Web Tokens, Signatures, and Encryption.

go get gopkg.in/square/go-jose.v1
INSTALL
IMPORT
SIG · SQUARE-GO-JOSE-V1
S
square-go-jose-v1
cryptogov1.1.2
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.v1

Encrypt a message using JWE

package main import ( "fmt" "gopkg.in/square/go-jose.v1" ) func main() { key := []byte("secret-32-characters-long!!!") encrypter, _ := jose.NewEncrypter(jose.A128GCM, jose.Recipient{Algorithm: jose.DIRECT, Key: key}, nil) obj, _ := encrypter.Encrypt([]byte("hello world")) fmt.Println(obj.FullSerialize()) }
Debug
Known issues
gotchav1 is legacy; consider migrating to v3 (github.com/go-jose/go-jose/v3)
fix
Update import to github.com/go-jose/go-jose/v3
affects: >=1.0.0
Upgrade
Version history
1.1.2latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
17 hits · last 30 days
node
16
Resources
square-go-jose-v1 — go get square-go-jose-v1 · libregistry