aesutils

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 19, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClearText

func GetClearText(key AESKey, secretBlob string) (string, error)

GetClearText localkey Client just returns the clearText

func GetEncryptedText

func GetEncryptedText(key AESKey, clearText string, algorithm string) (string, error)

GetEncryptedText localkey Client just returns the cipherText

func InitBlock

func InitBlock(aesKey AESKey) (cipher.Block, error)

func Sign

func Sign(aesKey AESKey, clearText string) (string, error)

Sign implements the interface

func VerifySignature

func VerifySignature(aesKey AESKey, signature, message string) (bool, error)

VerifySignature implements the interface.

Types

type AESKey

type AESKey interface {
	Key() ([]byte, error)
}

func NewAESKeyFromBytes

func NewAESKeyFromBytes(key []byte) AESKey

func NewAESKeyFromFile

func NewAESKeyFromFile(keyPath string) (AESKey, error)

func NewRandomAESKey

func NewRandomAESKey(length int) (AESKey, error)

type AESSecret

type AESSecret struct {
	Nonce      []byte
	Algorithm  string
	CipherText []byte
}

Jump to

Keyboard shortcuts

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