Documentation ¶
Overview ¶
Package jose provides an implementation of the Javascript Object Signing and Encryption.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decode ¶ added in v1.6.0
Decode parses a signed message in compact or full serialization format.
func Decrypt ¶ added in v1.6.0
func Decrypt(prv *rsa.PrivateKey, data string) ([]byte, error)
Decrypt parses an encrypted message in compact or full serialization format.
func RSAPrivateKey ¶
func RSAPrivateKey(data []byte) (*rsa.PrivateKey, error)
RSAPrivateKey parses data as *rsa.PrivateKey
Types ¶
type Encryption ¶ added in v1.6.0
type Encryption interface { Encrypt(payload []byte) (string, error) Decrypt(data string) ([]byte, error) }
Encryption is the interface that handles commonly used JWE operations.
func NewEncryption ¶ added in v1.6.0
func NewEncryption(publicKey, privateKey string) (Encryption, error)
New returns a Encryption. It's using predefined key, compression and algorithm.
type Signature ¶ added in v1.6.0
type Signature interface { Encode(payload []byte) (string, error) Decode(data string) ([]byte, error) }
Signature is the interface that handles commonly used JWS operations.
func NewSignature ¶ added in v1.6.0
NewSignature returns a Signature. It's using predefined key and algorithm.
Click to show internal directories.
Click to hide internal directories.