passwd

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2021 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

View Source
const F_Decrypt = "decrypt"
View Source
const F_Encrypt = "encrypt"
View Source
const SECRET = "spiff is a cool tool"
View Source
const TRIPPLEDES = "3DES"

Variables

This section is empty.

Functions

func CheckMAC

func CheckMAC(message, messageMAC, key []byte) bool

func DecodeString

func DecodeString(text string, c cipher.Block) (string, error)

func Encode

func Encode(plaintext []byte, c cipher.Block) string

func EncodeString

func EncodeString(text string, c cipher.Block) string

func GetCipher

func GetCipher(key string) (cipher.Block, error)

func MAC

func MAC(message, key []byte) []byte

func RegisterEncryption

func RegisterEncryption(name string, e Encoding)

Types

type Encoding

type Encoding interface {
	Encode(text string, key string) (string, error)
	Decode(text string, key string) (string, error)
	Name() string
}

func GetEncoding

func GetEncoding(name string) Encoding

Jump to

Keyboard shortcuts

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