Documentation
¶
Overview ¶
Package tinkcrypto provides the default implementation of the common pkg/common/api/crypto.Crypto interface and the SPI pkg/framework/aries.crypto interface
It uses github.com/tink/go crypto primitives
Index ¶
- type Crypto
- func (t *Crypto) ComputeMAC(data []byte, kh interface{}) ([]byte, error)
- func (t *Crypto) Decrypt(cipher, aad, nonce []byte, kh interface{}) ([]byte, error)
- func (t *Crypto) Encrypt(msg, aad []byte, kh interface{}) ([]byte, []byte, error)
- func (t *Crypto) Sign(msg []byte, kh interface{}) ([]byte, error)
- func (t *Crypto) Verify(sig, msg []byte, kh interface{}) error
- func (t *Crypto) VerifyMAC(macBytes, data []byte, kh interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Crypto ¶
type Crypto struct { }
Crypto is the default Crypto SPI implementation using Tink.
func (*Crypto) ComputeMAC ¶ added in v0.1.3
ComputeMAC computes message authentication code (MAC) for code data using a matching MAC primitive in kh key handle.
func (*Crypto) Decrypt ¶
Decrypt will decrypt cipher using the implementation's corresponding encryption key referenced by kh.
func (*Crypto) Encrypt ¶
Encrypt will encrypt msg using the implementation's corresponding encryption key and primitive in kh.
func (*Crypto) Sign ¶
Sign will sign msg using the implementation's corresponding signing key referenced by kh.
Directories
¶
Path | Synopsis |
---|---|
primitive
|
|
composite/ecdh1pu
Package ecdh1pu provides implementations of payload encryption using ECDH-1PU KW key wrapping with AEAD primitives.
|
Package ecdh1pu provides implementations of payload encryption using ECDH-1PU KW key wrapping with AEAD primitives. |
composite/ecdhes
Package ecdhes provides implementations of payload encryption using ECDH-ES KW key wrapping with AEAD primitives.
|
Package ecdhes provides implementations of payload encryption using ECDH-ES KW key wrapping with AEAD primitives. |