Versions in this module Expand all Collapse all v0 v0.0.9 Oct 30, 2019 Changes in this version + const A128CBC_HS256 + const A128GCM + const A128GCMKW + const A128KW + const A192CBC_HS384 + const A192GCM + const A192GCMKW + const A192KW + const A256CBC_HS512 + const A256GCM + const A256GCMKW + const A256KW + const DEFLATE + const DIRECT + const ECDH_ES + const ECDH_ES_A128KW + const ECDH_ES_A192KW + const ECDH_ES_A256KW + const ES256 + const ES384 + const ES512 + const HS256 + const HS384 + const HS512 + const NONE + const PBES2_HS256_A128KW + const PBES2_HS384_A192KW + const PBES2_HS512_A256KW + const PS256 + const PS384 + const PS512 + const RS256 + const RS384 + const RS512 + const RSA1_5 + const RSA_OAEP + const RSA_OAEP_256 + var ErrCryptoFailure = errors.New("square/go-jose: error in cryptographic primitive") + var ErrNotSupported = errors.New("square/go-jose: compact serialization not supported for object") + var ErrUnprotectedNonce = errors.New("square/go-jose: Nonce parameter included in unprotected header") + var ErrUnsupportedAlgorithm = errors.New("square/go-jose: unknown/unsupported algorithm") + var ErrUnsupportedKeyType = errors.New("square/go-jose: unsupported key type/format") + func LoadPrivateKey(data []byte) (interface{}, error) + func LoadPublicKey(data []byte) (interface{}, error) + type CompressionAlgorithm string + type ContentEncryption string + type Encrypter interface + Encrypt func(plaintext []byte) (*JsonWebEncryption, error) + EncryptWithAuthData func(plaintext []byte, aad []byte) (*JsonWebEncryption, error) + SetCompression func(alg CompressionAlgorithm) + func NewEncrypter(alg KeyAlgorithm, enc ContentEncryption, encryptionKey interface{}) (Encrypter, error) + type JoseHeader struct + Algorithm string + JsonWebKey *JsonWebKey + KeyID string + Nonce string + type JsonWebEncryption struct + Header JoseHeader + func ParseEncrypted(input string) (*JsonWebEncryption, error) + func (obj JsonWebEncryption) CompactSerialize() (string, error) + func (obj JsonWebEncryption) Decrypt(decryptionKey interface{}) ([]byte, error) + func (obj JsonWebEncryption) FullSerialize() string + func (obj JsonWebEncryption) GetAuthData() []byte + type JsonWebKey struct + Algorithm string + Certificates []*x509.Certificate + Key interface{} + KeyID string + Use string + func (k *JsonWebKey) Thumbprint(hash crypto.Hash) ([]byte, error) + func (k *JsonWebKey) UnmarshalJSON(data []byte) (err error) + func (k *JsonWebKey) Valid() bool + func (k JsonWebKey) MarshalJSON() ([]byte, error) + type JsonWebKeySet struct + Keys []JsonWebKey + func (s *JsonWebKeySet) Key(kid string) []JsonWebKey + type JsonWebSignature struct + Signatures []Signature + func ParseSigned(input string) (*JsonWebSignature, error) + func (obj JsonWebSignature) CompactSerialize() (string, error) + func (obj JsonWebSignature) FullSerialize() string + func (obj JsonWebSignature) Verify(verificationKey interface{}) ([]byte, error) + type KeyAlgorithm string + type MultiEncrypter interface + AddRecipient func(alg KeyAlgorithm, encryptionKey interface{}) error + Encrypt func(plaintext []byte) (*JsonWebEncryption, error) + EncryptWithAuthData func(plaintext []byte, aad []byte) (*JsonWebEncryption, error) + SetCompression func(alg CompressionAlgorithm) + func NewMultiEncrypter(enc ContentEncryption) (MultiEncrypter, error) + type MultiSigner interface + AddRecipient func(alg SignatureAlgorithm, signingKey interface{}) error + SetEmbedJwk func(embed bool) + SetNonceSource func(source NonceSource) + Sign func(payload []byte) (*JsonWebSignature, error) + func NewMultiSigner() MultiSigner + type NonceSource interface + Nonce func() (string, error) + type Signature struct + Header JoseHeader + Signature []byte + type SignatureAlgorithm string + type Signer interface + SetEmbedJwk func(embed bool) + SetNonceSource func(source NonceSource) + Sign func(payload []byte) (*JsonWebSignature, error) + func NewSigner(alg SignatureAlgorithm, signingKey interface{}) (Signer, error)