encryption

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package encryption 此包用于各个数据的加解密

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ECBDecrypt

func ECBDecrypt(crypted, key []byte) ([]byte, error)

ECBDecrypt ECB模式解密

func ECBEncrypt

func ECBEncrypt(src, key []byte) ([]byte, error)

ECBEncrypt ECB模式加密

func Hash

func Hash(pwd []byte) (string, error)

Hash 讲字符串进行md5加密

func PKCS5Padding

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

PKCS5Padding PKCS5填充

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) ([]byte, error)

PKCS5UnPadding 去除PKCS5填充

func PasswdDecrypt

func PasswdDecrypt(passwd string, key []byte) (string, error)

PasswdDecrypt 将密码解密

func PasswdEncrypt

func PasswdEncrypt(passwd string, key []byte) (string, error)

PasswdEncrypt 将密码加密

Types

This section is empty.

Jump to

Keyboard shortcuts

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