testkeyset

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2022 License: Apache-2.0 Imports: 4 Imported by: 14

Documentation

Overview

Package testkeyset provides for test code methods to read or write cleartext keyset material.

Index

Constants

This section is empty.

Variables

View Source
var (
	// KeysetHandle creates a keyset.Handle from cleartext key material.
	KeysetHandle = internal.KeysetHandle.(func(*tinkpb.Keyset) *keyset.Handle)
	// KeysetMaterial returns the key material contained in a keyset.Handle.
	KeysetMaterial = internal.KeysetMaterial.(func(*keyset.Handle) *tinkpb.Keyset)
)

Functions

func NewHandle

func NewHandle(ks *tinkpb.Keyset) (*keyset.Handle, error)

NewHandle creates a new instance of Handle using the given keyset.

func Read

func Read(r keyset.Reader) (*keyset.Handle, error)

Read creates a keyset.Handle from a cleartext keyset obtained via r.

func Write

func Write(h *keyset.Handle, w keyset.Writer) error

Write exports the keyset from h to the given writer w without encrypting it. Storing secret key material in an unencrypted fashion is dangerous. If feasible, you should use func keyset.Handle.Write() instead.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL