package hybrid
import "github.com/google/tink/go/testutil/hybrid"
Package hybrid provides HybridEncrypt/Decrypt primitive-specific test utilities.
Index ¶
Functions ¶
func KeysetHandleFromSerializedPrivateKey ¶
func KeysetHandleFromSerializedPrivateKey(privKeyBytes, pubKeyBytes []byte, template *tinkpb.KeyTemplate) (*keyset.Handle, error)
KeysetHandleFromSerializedPrivateKey returns a keyset handle containing a primary key that has the specified privKeyBytes and pubKeyBytes and matches template.
Supported templates include:
- DHKEM_X25519_HKDF_SHA256_HKDF_SHA256_CHACHA20_POLY1305_Raw_Key_Template, which requires privKeyBytes and pubKeyBytes to be the KEM-encoding of the private and public key, respectively, i.e. SerializePrivateKey and SerializePublicKey in https://www.rfc-editor.org/rfc/rfc9180.html#section-7.1.1.
Source Files ¶
- Version
- v1.7.0 (latest)
- Published
- Aug 10, 2022
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 3 months ago –
Tools for package owners.