encryption

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

*

@author: fanyanan
@date: 2022/6/9
@note: //Aes Encryption and decryption tools

*

*

@author: fanyanan
@date: 2022/6/9
@note: //Encrypt and decrypt global public resource

*

*

@author: fanyanan
@date: 2022/6/9
@note: //DES Encryption and decryption

*

*

@author: fanyanan
@date: 2022/6/9
@note: //md5 Encryption and decryption tools

*

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encryption

type Encryption struct {
}

Encryption and decryption overall structure

func (*Encryption) AesDecrypt

func (e *Encryption) AesDecrypt(crated string, salt ...string) (string, error)

AesDecrypt function original The original password, salt is an optional variable. If the salt exists, the passed variable is used. If it does not exist, the system default salt value is used.

func (*Encryption) AesEncrypt

func (e *Encryption) AesEncrypt(original string, key ...string) (string, error)

AesEncrypt function original The original password, salt is an optional variable. If the salt exists, the passed variable is used. If it does not exist, the system default salt value is used.

func (*Encryption) DesDecrypt

func (*Encryption) DesDecrypt(decrypted string, key ...string) (string, error)

DesDecrypt des encrypted function salt The parameter is the salt value of encryption and decryption, and the maximum length is 8. If the length is exceeded, the corresponding exception will be thrown

func (*Encryption) DesEncrypt

func (*Encryption) DesEncrypt(text string, key ...string) (string, error)

DesEncrypt des encrypted function salt The parameter is the salt value of encryption and decryption, and the maximum length is 8. If the length is exceeded, the corresponding exception will be thrown

func (*Encryption) Md5Check

func (e *Encryption) Md5Check(content, encrypted string) bool

Md5Check md5 Check method

func (*Encryption) Md5Encode

func (e *Encryption) Md5Encode(data string) string

Md5Encode md5 Signature function

Jump to

Keyboard shortcuts

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