utils

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package utils has functions used to store and retrieve keys

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeCipher

func MakeCipher(key string) (_ cipher.AEAD, err error)

MakeCipher creates a cipher from a base64 encoded string

func RingFromBytes

func RingFromBytes(b []byte) (*keys.KeyRing, error)

RingFromBytes uses gob encoding

func RingFromSecret

func RingFromSecret(b []byte, gcm cipher.AEAD) (*keys.KeyRing, error)

RingFromSecret decrypts a ring

func RingToBytes

func RingToBytes(r *keys.KeyRing) ([]byte, error)

RingToBytes uses gob encoding

func RingToSecret

func RingToSecret(r *keys.KeyRing, gcm cipher.AEAD) ([]byte, error)

RingToSecret encrypts a ring

Types

This section is empty.

Jump to

Keyboard shortcuts

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