Documentation ¶
Index ¶
- func ExportPrivateKey(pk *rsa.PrivateKey) ([]byte, error)
- func ExportPublicKey(pk *rsa.PrivateKey) ([]byte, error)
- func NewHMacSigner(secret []byte) (jose.Signer, error)
- func NewPublicKeyFromPEM(pk []byte) (*rsa.PublicKey, error)
- func NewRandomRSAKey() (*rsa.PrivateKey, error)
- func NewRandomSymmetricKey(size int) ([]byte, error)
- func NewSigner(privateKey *rsa.PrivateKey) (jose.Signer, error)
- func Sign(signer jose.Signer, content interface{}) (string, error)
- func UnsafeParse(s string, i interface{}) error
- func Verify(key interface{}, s string, i interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportPrivateKey ¶
func ExportPrivateKey(pk *rsa.PrivateKey) ([]byte, error)
func ExportPublicKey ¶
func ExportPublicKey(pk *rsa.PrivateKey) ([]byte, error)
func NewHMacSigner ¶
NewHMacSigner instantiates a signer using HMAC using SHA-512 with the given private key.
func NewRandomRSAKey ¶
func NewRandomRSAKey() (*rsa.PrivateKey, error)
NewRandomRSAKey generates a public/private key pair
func NewRandomSymmetricKey ¶
func NewSigner ¶
func NewSigner(privateKey *rsa.PrivateKey) (jose.Signer, error)
NewSigner instantiate a signer using RSASSA-PSS (SHA512) with the given private key.
func Sign ¶
Sign a json marshalled content and returns a protected JWS object using the full serialization format.
func UnsafeParse ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.