crypter

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

DES、3DES加解密示例,

  • For crypter md5

Index

Constants

View Source
const KEYS = "gfe023u_sefiel#fi32lf3z!" //必须24位

Variables

This section is empty.

Functions

func AuthCode

func AuthCode(text, skey string, btype bool) string

func Base64Decode

func Base64Decode(str string) []byte

Base64Decode

func DesDe

func DesDe(code, key string) string

*

  • 解密已转为16进制字符串有DES加密

func DesDecrypt

func DesDecrypt(args ...string) (string, error)

*

  • 解密已转为base64字符串有DES加密

func DesEn

func DesEn(code, key string) string

*

  • 加密并转换为16进制字符串

func DesEncrypt

func DesEncrypt(args ...string) (string, error)

*

  • 加密并转换为base64字符串

func EncryptedToken

func EncryptedToken(token, key string) string

func Md5Password

func Md5Password(password string, rand ...string) string

密码加密

func Md5Sum

func Md5Sum(str string) string

MD5SUm

func PKCS5Padding

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

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) []byte

func TripleDesDecrypt

func TripleDesDecrypt(args ...string) (string, error)

3DES解密

func TripleDesEncrypt

func TripleDesEncrypt(args ...string) (string, error)

3DES加密, 可与php MCRYPT_3DES加密方式对应

func ZeroPadding

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

func ZeroUnPadding

func ZeroUnPadding(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