hcrypto

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

README

hencrypt

Encrypt

Documentation

Index

Constants

View Source
const PKCS5_PADDING = "PKCS5"
View Source
const PKCS7_PADDING = "PKCS7"
View Source
const ZEROS_PADDING = "ZEROS"

Variables

This section is empty.

Functions

func AesCBCDecrypt

func AesCBCDecrypt(src, key, iv []byte, padding string) ([]byte, error)

AesCBCDecrypt

func AesCBCEncrypt

func AesCBCEncrypt(src, key, iv []byte, padding string) ([]byte, error)

AesCBCEncrypt

func AesECBDecrypt

func AesECBDecrypt(src, key []byte, padding string) ([]byte, error)

AesECBDecrypt

func AesECBEncrypt

func AesECBEncrypt(src, key []byte, padding string) ([]byte, error)

AesECBEncrypt

func Base64Encode

func Base64Encode()

func CBCDecrypt

func CBCDecrypt(block cipher.Block, src, iv []byte, padding string) ([]byte, error)

CBCDecrypt

func CBCEncrypt

func CBCEncrypt(block cipher.Block, src, iv []byte, padding string) ([]byte, error)

CBCEncrypt

func Des3CBCDecrypt

func Des3CBCDecrypt(src, key, iv []byte, padding string) ([]byte, error)

Des3CBCDecrypt

func Des3CBCEncrypt

func Des3CBCEncrypt(src, key, iv []byte, padding string) ([]byte, error)

Des3CBCEncrypt

func Des3ECBDecrypt

func Des3ECBDecrypt(src, key []byte, padding string) ([]byte, error)

Des3ECBDecrypt

func Des3ECBEncrypt

func Des3ECBEncrypt(src, key []byte, padding string) ([]byte, error)

Des3ECBEncrypt

func DesCBCDecrypt

func DesCBCDecrypt(src, key, iv []byte, padding string) ([]byte, error)

DesCBCDecrypt

func DesCBCEncrypt

func DesCBCEncrypt(src, key, iv []byte, padding string) ([]byte, error)

DesCBCEncrypt

func DesECBDecrypt

func DesECBDecrypt(src, key []byte, padding string) ([]byte, error)

DesECBDecrypt

func DesECBEncrypt

func DesECBEncrypt(src, key []byte, padding string) ([]byte, error)

DesECBEncrypt

func DesMd5Decode

func DesMd5Decode(src, key string) (string, error)

解密

func DesMd5Encode

func DesMd5Encode(src, key string) (string, error)

加密

func ECBDecrypt

func ECBDecrypt(block cipher.Block, src []byte, padding string) ([]byte, error)

func ECBEncrypt

func ECBEncrypt(block cipher.Block, src []byte, padding string) ([]byte, error)

func KeyGenerator

func KeyGenerator(src []byte, blockSize int) []byte

func KeySha1

func KeySha1(data []byte) []byte

func Md5

func Md5(str string) string

32位字符串

func Md5Raw16

func Md5Raw16(v string) string

16位字符串

func NewECBDecrypter

func NewECBDecrypter(b cipher.Block) cipher.BlockMode

NewECBDecrypter returns a BlockMode which decrypts in electronic code book mode, using the given Block.

func NewECBEncrypter

func NewECBEncrypter(b cipher.Block) cipher.BlockMode

NewECBEncrypter returns a BlockMode which encrypts in electronic code book mode, using the given Block.

func PKCS5Padding

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

func PKCS5Unpadding

func PKCS5Unpadding(src []byte) []byte

func PKCS7Padding

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

func PKCS7UnPadding

func PKCS7UnPadding(src []byte) []byte

func Padding

func Padding(padding string, src []byte, blockSize int) []byte

func Sha1

func Sha1(str string) string

Sha1 Calculate the sha1 hash of a string

func UnPadding

func UnPadding(padding string, src []byte) []byte

func ZerosPadding

func ZerosPadding(src []byte, blockSize int) []byte

func ZerosUnPadding

func ZerosUnPadding(src []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