internal

package
v0.0.0-...-46d254a Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const EnvVar = "ENVKMS_KEYSET"

Variables

View Source
var EnvContents []byte

Functions

func GenerateKeyset

func GenerateKeyset() (string, error)

func MarshalKeyset

func MarshalKeyset(ks *envkmspb.Keyset) (string, error)

MarshalKeyset seralizes the given keyset

func UnmarshalKeyset

func UnmarshalKeyset(serialized string) (*envkmspb.Keyset, error)

UnmarshalKeyset unmarshals the serialized keyset

Types

type KeysetReader

type KeysetReader struct {
	From *envkmspb.Keyset
}

func (*KeysetReader) Read

func (k *KeysetReader) Read() (*tinkpb.Keyset, error)

func (*KeysetReader) ReadEncrypted

func (k *KeysetReader) ReadEncrypted() (*tinkpb.EncryptedKeyset, error)

type KeysetWriter

type KeysetWriter struct {
	Into *envkmspb.Keyset
}

func (*KeysetWriter) Write

func (k *KeysetWriter) Write(keyset *tinkpb.Keyset) error

func (*KeysetWriter) WriteEncrypted

func (k *KeysetWriter) WriteEncrypted(keyset *tinkpb.EncryptedKeyset) error

Jump to

Keyboard shortcuts

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