zdpgo_password

package module
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: MIT Imports: 5 Imported by: 3

README

Golang加密解密框架

超简单的Golang密码加密解密工具

项目地址:https://github.com/zhangdapeng520/zdpgo_password

功能清单

  • 常用HASH加密
  • AES加密解密
  • RSA加密解密
  • ECC加密解密

版本历史

  • v0.1.0 2022/01/01
  • v0.1.1 2022/03/02 AES加密和RSA加密
  • v1.1.0 2022/04/01 ECC加密
  • v1.1.1 2022/04/01 移除第三方依赖
  • v1.1.2 2022/04/01 项目结构优化
  • v1.1.3 2022/04/07 日志组件升级
  • v1.1.4 2022/04/07 AES的GCM加密模式便捷方法
  • v1.1.5 2022/04/09 新增不使用Key的MD5加密和校验方法
  • v1.1.6 2022/04/01 新增URL编码和解码
  • v1.1.7 2022/04/01 新增HEX编码和解码
  • v1.1.8 2022/05/04 新增:文件加密解密
  • v1.1.9 2022/05/04 优化:文件加密解密
  • v1.2.0 2022/06/02 优化:ECC加密解密
  • v1.2.1 2022/06/06 新增:ECC支持指定公钥和私钥
  • v1.2.2 2022/06/06 新增:ECC支持获取公钥和私钥
  • v1.2.3 2022/06/06 优化:多个ECC对象支持共用公钥和私钥
  • v1.2.4 2022/06/11 新增:不使用base64编码的ECC加密方式
  • v1.2.5 2022/06/14 优化:日志创建方式优化
  • v1.2.6 2022/06/21 新增:密码生成器、密码文件生成和更新
  • v1.2.7 2022/06/21 新增:加密HTTP服务信息
  • v1.2.8 2022/06/21 新增:加密字节数组
  • v1.2.9 2022/06/28 优化:移除日志组件
  • v1.3.0 2022/07/08 优化:移除ECC、RSA、File加密解密

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists added in v1.2.0

func Exists(path string) bool

Exists 判断所给路径文件/文件夹是否存在

Types

type Config added in v1.2.0

type Config struct {
	Aes     aes.AesConfig   `yaml:"aes" json:"aes"`   // AES加密核心配置
	Hash    hash.HashConfig `yaml:"hash" json:"hash"` // HASH加密核心配置
	KeyPath string          `yaml:"key_path" json:"key_path"`
}

Config 密码配置对象

type HttpServerInfo added in v1.2.7

type HttpServerInfo struct {
	Host     string                 `json:"host"`
	Port     int                    `json:"port"`
	Username string                 `json:"username"`
	Password string                 `json:"password"`
	Email    string                 `json:"email"`
	Role     int                    `json:"role"`
	IsSsl    bool                   `json:"is_ssl"`
	Data     map[string]interface{} `json:"data"`
}

HttpServerInfo HTTP服务信息

type Password added in v1.1.2

type Password struct {
	Config   *Config           // 配置对象
	Aes      *aes.Aes          // AES加密核心对象
	Hash     *hash.Hash        // HASH加密核心对象
	Url      *zurl.Url         // URL编码解码核心对象
	Hex      *hex.Hex          // 十六进制编码解码
	BytesMap map[string][]byte // 用于存放bytes数组的字典
}

Password 密码加密核心对象

func New

func New() *Password

func NewWithConfig added in v1.2.3

func NewWithConfig(config *Config) *Password

NewWithConfig 创建加密对象

Directories

Path Synopsis
examples
aes_dump_load command
z01_hash command
z02_aes command
Package pbkdf2 implements the key derivation function PBKDF2 as defined in RFC 2898 / PKCS #5 v2.0.
Package pbkdf2 implements the key derivation function PBKDF2 as defined in RFC 2898 / PKCS #5 v2.0.

Jump to

Keyboard shortcuts

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