Documentation
¶
Index ¶
- type AsymmetricDecryptionKey
- func (a *AsymmetricDecryptionKey) Algorithm() jose.Alg
- func (a *AsymmetricDecryptionKey) Certificates() []*x509.Certificate
- func (a *AsymmetricDecryptionKey) Decrypt(_ jose.KeyOps, hash crypto.Hash, bytes []byte) ([]byte, error)
- func (a *AsymmetricDecryptionKey) Encryptor() (gose.AsymmetricEncryptionKey, error)
- func (a *AsymmetricDecryptionKey) Kid() string
- type AsymmetricDecryptionKeyStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsymmetricDecryptionKey ¶
type AsymmetricDecryptionKey struct {
// contains filtered or unexported fields
}
AsymmetricDecryptionKey implements RSA OAEP using SHA1 decryption. This structure is made to provide a management of pkcs11-handled asymmetric key pairs
func NewAsymmetricDecryptionKey ¶ added in v0.9.1
func NewAsymmetricDecryptionKey(pkcs11Context *crypto11.Context, key crypto11.SignerDecrypter, kid []byte, keylabel []byte) (*AsymmetricDecryptionKey, error)
NewAsymmetricDecryptionKey creates an instance with the given pkcs11 key handler. 'keyid' or 'keylabel' can be nil, but nut both. Provide at least one or both.
func (*AsymmetricDecryptionKey) Algorithm ¶
func (a *AsymmetricDecryptionKey) Algorithm() jose.Alg
Algorithm return jose.AlgRSAOAEP the fixed algorithm that AsymmetricDecryptionKey implements.
func (*AsymmetricDecryptionKey) Certificates ¶
func (a *AsymmetricDecryptionKey) Certificates() []*x509.Certificate
Certificates associated x509 certificates.
func (*AsymmetricDecryptionKey) Decrypt ¶
func (a *AsymmetricDecryptionKey) Decrypt(_ jose.KeyOps, hash crypto.Hash, bytes []byte) ([]byte, error)
Decrypt the given ciphertext data returning the derived plaintext.
func (*AsymmetricDecryptionKey) Encryptor ¶
func (a *AsymmetricDecryptionKey) Encryptor() (gose.AsymmetricEncryptionKey, error)
Encryptor get the matching AsymmetricEncryptionKey for this decryptor.
func (*AsymmetricDecryptionKey) Kid ¶
func (a *AsymmetricDecryptionKey) Kid() string
Kid the unique identifier of this key.
type AsymmetricDecryptionKeyStore ¶
type AsymmetricDecryptionKeyStore struct {
// contains filtered or unexported fields
}
AsymmetricDecryptionKeyStore implements the AsymmetricDecryptionKeyStore interface providing key lookup
func NewAsymmetricDecryptionKeyStore ¶
func NewAsymmetricDecryptionKeyStore(ctx *crypto11.Context) *AsymmetricDecryptionKeyStore
NewAsymmetricDecryptionKeyStore creates an instance of AsymmetricDecryptionKeyStore.
func (*AsymmetricDecryptionKeyStore) Get ¶
func (a *AsymmetricDecryptionKeyStore) Get(kid string) (k gose.AsymmetricDecryptionKey, err error)
Get returns gose.AsymmetricDecryptionKey which match the given key ID.