cipher

package
v0.0.0-...-26e1b9e Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

README

Cipher模块

Cipher模块提供了多种加解密方法:AES、MD5、RSA

使用示例:

	本包主要用于数据库、消息队列和缓存(如:redis)的秘钥加密。默认使用的是对称加密AES的CBC模式
	秘钥强度要求为256位,否则直接抛出异常。
	使用方式如下:
	设置秘钥:
	xaes.SetAESSecret(key)
	加密: ciphertext,err:=xaes.Encrypt(plaintext)
	解密: plaintext,err:=xaes.Decrypt(ciphertext)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MD5

func MD5(data string) string

MD5 md5 加密

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