Documentation ¶
Index ¶
- func ECDSAKeyMatches(privateKey *ecdsa.PrivateKey, publicKey *ecdsa.PublicKey) bool
- func ECDSAPublicKeyEqual(a, b *ecdsa.PublicKey) bool
- func GenerateKey(ctx context.Context, km keymanager.KeyManager, keyID string, ...) (crypto.PublicKey, error)
- func GenerateKeyRaw(ctx context.Context, km keymanager.KeyManager, keyID string, ...) ([]byte, error)
- func GetPublicKey(ctx context.Context, km keymanager.KeyManager, keyID string) (crypto.PublicKey, error)
- func KeyMatches(privateKey crypto.PrivateKey, publicKey crypto.PublicKey) (bool, error)
- func PublicKeyEqual(a, b crypto.PublicKey) (bool, error)
- func RSAKeyMatches(privateKey *rsa.PrivateKey, publicKey *rsa.PublicKey) bool
- func RSAPublicKeyEqual(a, b *rsa.PublicKey) bool
- type KeyManagerSigner
- func (s *KeyManagerSigner) KeyID() string
- func (s *KeyManagerSigner) Public() crypto.PublicKey
- func (s *KeyManagerSigner) Sign(_ io.Reader, digest []byte, opts crypto.SignerOpts) ([]byte, error)
- func (s *KeyManagerSigner) SignContext(ctx context.Context, digest []byte, opts crypto.SignerOpts) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ECDSAKeyMatches ¶
func ECDSAKeyMatches(privateKey *ecdsa.PrivateKey, publicKey *ecdsa.PublicKey) bool
func ECDSAPublicKeyEqual ¶
func GenerateKey ¶
func GenerateKey(ctx context.Context, km keymanager.KeyManager, keyID string, keyType keymanager.KeyType) (crypto.PublicKey, error)
func GenerateKeyRaw ¶
func GenerateKeyRaw(ctx context.Context, km keymanager.KeyManager, keyID string, keyType keymanager.KeyType) ([]byte, error)
func GetPublicKey ¶
func GetPublicKey(ctx context.Context, km keymanager.KeyManager, keyID string) (crypto.PublicKey, error)
func KeyMatches ¶
func RSAKeyMatches ¶
func RSAKeyMatches(privateKey *rsa.PrivateKey, publicKey *rsa.PublicKey) bool
func RSAPublicKeyEqual ¶
Types ¶
type KeyManagerSigner ¶
type KeyManagerSigner struct {
// contains filtered or unexported fields
}
func GenerateKeyAndSigner ¶
func GenerateKeyAndSigner(ctx context.Context, km keymanager.KeyManager, keyID string, keyType keymanager.KeyType) (*KeyManagerSigner, error)
func NewKeyManagerSigner ¶
func NewKeyManagerSigner(km keymanager.KeyManager, keyID string, publicKey crypto.PublicKey) *KeyManagerSigner
func (*KeyManagerSigner) KeyID ¶
func (s *KeyManagerSigner) KeyID() string
func (*KeyManagerSigner) Public ¶
func (s *KeyManagerSigner) Public() crypto.PublicKey
func (*KeyManagerSigner) Sign ¶
func (s *KeyManagerSigner) Sign(_ io.Reader, digest []byte, opts crypto.SignerOpts) ([]byte, error)
func (*KeyManagerSigner) SignContext ¶
func (s *KeyManagerSigner) SignContext(ctx context.Context, digest []byte, opts crypto.SignerOpts) ([]byte, error)
Click to show internal directories.
Click to hide internal directories.