utils

package
v0.0.0-...-81fcf0e Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	PASSWORD_LEN  = 12
	DEFALT_CIPHER = "CIPHER_A"
)

Variables

View Source
var CIPHER_MAP = map[string]string{
	"CIPHER_A": "{cipher_a}",
}

Functions

func AesDePassword

func AesDePassword(guid, seed, password string) (string, error)

func AesDecode

func AesDecode(key string, encryptData string) (password string, err error)

func AesEnPassword

func AesEnPassword(guid, seed, password, cipher string) (string, error)

func AesEncode

func AesEncode(key string, rawData string) (string, error)

func CreateRandomPassword

func CreateRandomPassword() string

func Md5Encode

func Md5Encode(rawData string) string

func PKCS7Padding

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

func PKCS7UnPadding

func PKCS7UnPadding(origData []byte) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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