Documentation ¶
Index ¶
- func MapECCurveToKeyType(curve elliptic.Curve) (kmsapi.KeyType, error)
- type Signer
- func GetEd25519Signer(privKey ed25519.PrivateKey, pubKey ed25519.PublicKey) Signer
- func GetSigner(privateKeyJWK *jwk.JWK) (Signer, error)
- func NewCryptoSigner(crypto cryptoapi.Crypto, kms kmsapi.KeyManager, keyType kmsapi.KeyType) (Signer, error)
- func NewSigner(keyType kmsapi.KeyType) (Signer, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Signer ¶
type Signer interface { // Sign signs the message. Sign(msg []byte) ([]byte, error) // PublicKey returns a public key object (e.g. ed25519.VerificationMethod or *ecdsa.PublicKey). PublicKey() interface{} // PublicKeyBytes returns bytes of the public key. PublicKeyBytes() []byte // Alg return alg. Alg() string }
Signer defines generic signer.
func GetEd25519Signer ¶
func GetEd25519Signer(privKey ed25519.PrivateKey, pubKey ed25519.PublicKey) Signer
GetEd25519Signer returns Ed25519 Signer with predefined private and public keys.
func GetSigner ¶
GetSigner returns a new Signer based on privateKey. For case ed25519.PrivateKey pubKey is nil.
func NewCryptoSigner ¶
func NewCryptoSigner(crypto cryptoapi.Crypto, kms kmsapi.KeyManager, keyType kmsapi.KeyType) (Signer, error)
NewCryptoSigner creates a new signer based on crypto if possible.
Click to show internal directories.
Click to hide internal directories.