encryptor

package
v0.0.0-...-1118b22 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenRandom

func GenRandom(l int) []byte

func PKCS5Padding

func PKCS5Padding(ciphertext []byte, blockSize int) []byte

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) []byte

AES

Types

type AesEncoder

type AesEncoder struct{}

func (AesEncoder) Decrypt

func (ae AesEncoder) Decrypt(pwd string, aeskey []byte) (string, error)

func (AesEncoder) Encrypt

func (ae AesEncoder) Encrypt(result []byte, aeskey []byte) (string, error)

type MD4Encoder

type MD4Encoder struct{}

func (MD4Encoder) Encode

func (me MD4Encoder) Encode(passwd []byte) string

func (MD4Encoder) Matches

func (me MD4Encoder) Matches(encodedPass, rawPass string) bool

type SSHAEncoder

type SSHAEncoder struct{}

func (SSHAEncoder) Encode

func (se SSHAEncoder) Encode(rawPass []byte) string

func (SSHAEncoder) Matches

func (se SSHAEncoder) Matches(encodedPass, rawPass []byte) bool

Jump to

Keyboard shortcuts

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