Documentation
¶
Index ¶
- func GetSigner(alg model.Algorithm, opts *model.Opts) (model.Signer, error)
- func GetSignerFromPrivateKey(alg model.Algorithm, privateKey crypto.PrivateKey) (model.Signer, error)
- func GetValidator(alg model.Algorithm, publicKey crypto.PublicKey) (model.Validator, error)
- func GetValidatorFromJwk(alg model.Algorithm, jwk []byte) (model.Validator, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSigner ¶
GetSigner
Returns a Signer implementation for the given algorithm complete with generated keypair ¶
alg - Determines which signer type gets returned
opts - Extra options object to control additional algorithm specific behaviour. BitSize determines the size of key to be returned for RSA keys - if none specified defaults to 2048. SecretKey is used to define a secret key value for HMAC algorithms
func GetSignerFromPrivateKey ¶
func GetSignerFromPrivateKey(alg model.Algorithm, privateKey crypto.PrivateKey) (model.Signer, error)
GetSignerFromPrivateKey
Returns a Signer implementation for the given algorithm and private key ¶
alg - Determines which signer type gets returned
privateKey - The provided `crypto.PrivateKey` implementation. Must be a pointer to the relevant key type for the selected algorithm
func GetValidator ¶
GetValidator
Returns a Validator implementation for the given algorithm and public key ¶
alg - Determines which validator type gets returned
publicKey - `crypto.PublicKey` implementation to be used by the validator
Types ¶
This section is empty.