Documentation
¶
Index ¶
- type Crypto
- func (c *Crypto) ComputeMAC(data []byte, kh interface{}) ([]byte, error)
- func (c *Crypto) Decrypt(cipher, aad, nonce []byte, kh interface{}) ([]byte, error)
- func (c *Crypto) Encrypt(msg, aad []byte, kh interface{}) ([]byte, []byte, error)
- func (c *Crypto) Sign(msg []byte, kh interface{}) ([]byte, error)
- func (c *Crypto) UnwrapKey(recWK *cryptoapi.RecipientWrappedKey, kh interface{}, ...) ([]byte, error)
- func (c *Crypto) Verify(signature, msg []byte, kh interface{}) error
- func (c *Crypto) VerifyMAC(mac, data []byte, kh interface{}) error
- func (c *Crypto) WrapKey(cek, apu, apv []byte, recPubKey *cryptoapi.PublicKey, ...) (*cryptoapi.RecipientWrappedKey, error)
- type SignFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Crypto ¶
type Crypto struct {
EncryptValue []byte
EncryptNonceValue []byte
EncryptErr error
DecryptValue []byte
DecryptErr error
SignValue []byte
SignKey []byte
SignFn SignFunc
SignErr error
VerifyErr error
ComputeMACValue []byte
ComputeMACErr error
VerifyMACErr error
WrapValue *cryptoapi.RecipientWrappedKey
WrapError error
UnwrapValue []byte
UnwrapError error
}
Crypto mock.
func (*Crypto) ComputeMAC ¶ added in v0.1.3
ComputeMAC returns a mocked value and a mocked error.
func (*Crypto) UnwrapKey ¶ added in v0.1.5
func (c *Crypto) UnwrapKey(recWK *cryptoapi.RecipientWrappedKey, kh interface{}, wrapKeyOpts ...cryptoapi.WrapKeyOpts) ([]byte, error)
UnwrapKey returns a mocked value.
Click to show internal directories.
Click to hide internal directories.