z1crypto

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecrypt

func AesDecrypt(cryted, key string) (orig string)

AesEncrypt("Y14T6rcetYC2WoB2y5JGNQ", "1234567890123456") key's length must in 16/24/32

func AesEncrypt

func AesEncrypt(orig, key string) (cryted string)

AesEncrypt("woolge735", "1234567890123456") key's length must in 16/24/32

func MD5Check

func MD5Check(content, encrypted string) bool

MD5Check("myzero1")

func MD5Encode

func MD5Encode(data string) string

MD5Encode("myzero1")

func PKCS7Padding

func PKCS7Padding(ciphertext []byte, blocksize int) []byte

补码

func PKCS7UnPadding

func PKCS7UnPadding(origData []byte) []byte

去码

func RsaDecrypt

func RsaDecrypt(cryted string, privateKey []byte) (orig string)

解密

func RsaEncrypt

func RsaEncrypt(orig string, publicKey []byte) (cryted string)

加密

func RsaKeyPairs

func RsaKeyPairs(keyName string, bits int) (privateKeyString, publicKeyString string)

RsaKeyPairs("keyName", 2048)

Types

This section is empty.

Jump to

Keyboard shortcuts

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