cryptil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64Decoding

func Base64Decoding(encodeString string) string

base64 解密

func Base64Encoding

func Base64Encoding(str string) string

base64 加密

func CBCDecrypter

func CBCDecrypter(ciphertext, key []byte) ([]byte, error)

func CBCEncrypter

func CBCEncrypter(plaintext, key []byte) ([]byte, error)

aes

func Md5Crypt

func Md5Crypt(plaintext string, salt ...interface{}) string

md5加密 @Param plaintext string 需要加密的字符串 @Param salt 盐值

func PKCS5Padding

func PKCS5Padding(cipertext []byte, blocksize int) []byte

* 填充码

填充个数

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) []byte

func RsaDecrypt

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

解密

func RsaEncrypt

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

func SHA1Crypt

func SHA1Crypt(plaintext string, salt ...interface{}) string

SHA1加密

func ZeroPadding

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

填充0

func ZeroUnPadding

func ZeroUnPadding(origData []byte) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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