security

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecrypt

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

func AesEncrypt

func AesEncrypt(origData, key []byte) ([]byte, error)

func DesDecrypt

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

func DesEncrypt

func DesEncrypt(origData, key []byte) ([]byte, error)

func GenRsaKey

func GenRsaKey(bits int) ([]byte, []byte, error)

RSA公钥私钥产生

func PKCS5Padding

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

ECB PKCS5Padding

func PKCS5Unpadding

func PKCS5Unpadding(origData []byte) []byte

ECB PKCS5Unpadding

func PKCS7Padding

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

func PKCS7UnPadding

func PKCS7UnPadding(origData []byte) []byte

func RsaDecrypt

func RsaDecrypt(ciphertext, privateKey []byte) ([]byte, error)

解密

func RsaEncrypt

func RsaEncrypt(origData, publicKey []byte) ([]byte, error)

加密

func TripleEcbDesDecrypt

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

[golang ECB 3DES Decrypt]

func TripleEcbDesEncrypt

func TripleEcbDesEncrypt(origData, key []byte) ([]byte, error)

[golang ECB 3DES Encrypt]

Types

This section is empty.

Jump to

Keyboard shortcuts

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