Versions in this module Expand all Collapse all v0 v0.2.0 Jan 18, 2025 v0.1.0 Jan 7, 2025 Changes in this version + var ErrInvalidKeyType = errors.New("invalid key type") + var ErrInvalidSignature = errors.New("invalid signature format") + var ErrUnsupportedAlgorithm = errors.New("unsupported algorithm") + func List() []string + func Register(alg Algorithm) + type Algorithm interface + Hash func() crypto.Hash + KeyCheck func(key interface{}) error + Name func() string + SigningParams func() map[string]interface{} + VaultKeyType func() string + Verify func(message, signature []byte, key interface{}) error + func Get(name string) (Algorithm, error) + func NewECDSAAlgorithm(name string, hash crypto.Hash, curve ellipticCurve) Algorithm + func NewRSAAlgorithm(name string, hash crypto.Hash, pad padding) Algorithm + type BaseAlgorithm struct + func (b *BaseAlgorithm) Hash() crypto.Hash + func (b *BaseAlgorithm) KeyCheck(key interface{}) error + func (b *BaseAlgorithm) Name() string + func (b *BaseAlgorithm) SigningParams() map[string]interface{} + func (b *BaseAlgorithm) VaultKeyType() string + type ECDSAAlgorithm struct + func (e *ECDSAAlgorithm) SigningParams() map[string]interface{} + func (e *ECDSAAlgorithm) Verify(message, signature []byte, key interface{}) error + type ECDSASignature struct + R *big.Int + S *big.Int + type KeyType int + const KeyTypeECDSA + const KeyTypeRSA + type RSAAlgorithm struct + func (r *RSAAlgorithm) SigningParams() map[string]interface{} + func (r *RSAAlgorithm) Verify(message, signature []byte, key interface{}) error