Documentation ¶
Overview ¶
Package wrapper contains mocks for kms+crypto wrapper APIs.
Index ¶
- type MockFixedKeyCrypto
- type MockKMSCrypto
- func (m *MockKMSCrypto) Create(keyType kms.KeyType) (*jwk.JWK, error)
- func (m *MockKMSCrypto) CreateRaw(keyType kms.KeyType) (string, interface{}, error)
- func (m *MockKMSCrypto) Decrypt(cipher, aad, nonce []byte, kid string) (msg []byte, err error)
- func (m *MockKMSCrypto) Encrypt(msg, aad []byte, kid string) (cipher, nonce []byte, err error)
- func (m *MockKMSCrypto) ExportPubKeyBytes(id string) ([]byte, kms.KeyType, error)
- func (m *MockKMSCrypto) FixedKeyCrypto(pub *jwk.JWK) (wrapperapi.FixedKeyCrypto, error)
- func (m *MockKMSCrypto) FixedKeyMultiSigner(pub *jwk.JWK) (wrapperapi.FixedKeyMultiSigner, error)
- func (m *MockKMSCrypto) FixedKeySigner(pub *jwk.JWK) (wrapperapi.FixedKeySigner, error)
- func (m *MockKMSCrypto) FixedMultiSignerGivenKID(kid string) (wrapperapi.FixedKeyMultiSigner, error)
- func (m *MockKMSCrypto) Sign(msg []byte, pub *jwk.JWK) ([]byte, error)
- func (m *MockKMSCrypto) SignMulti(msgs [][]byte, pub *jwk.JWK) ([]byte, error)
- func (m *MockKMSCrypto) Verify(sig, msg []byte, pub *jwk.JWK) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockFixedKeyCrypto ¶
MockFixedKeyCrypto mocks kmscrypto.FixedKeyCrypto.
func (*MockFixedKeyCrypto) Sign ¶
func (m *MockFixedKeyCrypto) Sign(msg []byte) ([]byte, error)
Sign mock.
func (*MockFixedKeyCrypto) SignMulti ¶
func (m *MockFixedKeyCrypto) SignMulti(msgs [][]byte) ([]byte, error)
SignMulti mock.
func (*MockFixedKeyCrypto) Verify ¶
func (m *MockFixedKeyCrypto) Verify(sig, msg []byte) error
Verify mock.
type MockKMSCrypto ¶
type MockKMSCrypto struct { CreateVal *jwk.JWK PubKeyBytes []byte PubKeyType kms.KeyType PubKeyErr error CreateRawKID string CreateRawVal interface{} CreateErr error SignVal []byte SignErr error VerifyErr error FixedKeyCryptoVal *MockFixedKeyCrypto FixedKeyCryptoErr error EncryptVal []byte EncryptNonce []byte EncryptErr error DecryptVal []byte DecryptErr error }
MockKMSCrypto mocks wrapper.KMSCrypto.
func (*MockKMSCrypto) CreateRaw ¶
func (m *MockKMSCrypto) CreateRaw(keyType kms.KeyType) (string, interface{}, error)
CreateRaw mock.
func (*MockKMSCrypto) Decrypt ¶
func (m *MockKMSCrypto) Decrypt(cipher, aad, nonce []byte, kid string) (msg []byte, err error)
Decrypt mock.
func (*MockKMSCrypto) Encrypt ¶
func (m *MockKMSCrypto) Encrypt(msg, aad []byte, kid string) (cipher, nonce []byte, err error)
Encrypt mock.
func (*MockKMSCrypto) ExportPubKeyBytes ¶ added in v1.2.0
ExportPubKeyBytes mock.
func (*MockKMSCrypto) FixedKeyCrypto ¶
func (m *MockKMSCrypto) FixedKeyCrypto(pub *jwk.JWK) (wrapperapi.FixedKeyCrypto, error)
FixedKeyCrypto mock.
func (*MockKMSCrypto) FixedKeyMultiSigner ¶
func (m *MockKMSCrypto) FixedKeyMultiSigner(pub *jwk.JWK) (wrapperapi.FixedKeyMultiSigner, error)
FixedKeyMultiSigner mock.
func (*MockKMSCrypto) FixedKeySigner ¶
func (m *MockKMSCrypto) FixedKeySigner(pub *jwk.JWK) (wrapperapi.FixedKeySigner, error)
FixedKeySigner mock.
func (*MockKMSCrypto) FixedMultiSignerGivenKID ¶
func (m *MockKMSCrypto) FixedMultiSignerGivenKID(kid string) (wrapperapi.FixedKeyMultiSigner, error)
FixedMultiSignerGivenKID mock.
Click to show internal directories.
Click to hide internal directories.