CryptoHelper

package
v1.1.22 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: AGPL-3.0 Imports: 2 Imported by: 0

README

加密处理类

处理类型

  1. Aes
  2. Hash
  3. md5

文件说明

名称 所在目录 备注说明
aes CryptoHelper/EncryptAes/Aes.go aes 加密(java, php, go通用)
aes CryptoHelper/EncryptAes/AesPadding/Aes.go aes 加密,补充填充未兼容其它语言
hash CryptoHelper/Hash.go hash26
md5 CryptoHelper/EncryptMd5/Md5.go md5 加密

使用案例:

  1. aes (java php go 通用版)
str:="123456"
key:="123456"
aesEncryptBytes,_:= EncryptAes.AesEncrypt([]byte(str),[]byte(key))
aesEncrypt :=string(aesEncryptBytes)
fmt.Println(aesEncrypt)
  1. hash
str:="1234565"
hashStr:=CryptoHelper.Hash256(str)
fmt.Println(hashStr)
  1. md5
str:="123456"
md5Str,_:=EncryptMd5.Md5(str)
fmt.Println(md5Str)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hash256

func Hash256(str string) string

* 生成hash256

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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