xcrypto

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const ShortChar = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"

Variables

This section is empty.

Functions

func Base62Decode

func Base62Decode(str string) int64

func Base62Encode

func Base62Encode(number int64) string

func DecryptDESECB4Base64

func DecryptDESECB4Base64(src, key string) string

des ECB hex解密: src := xcrypto.DecryptDESECB4Base64(xcrypto.EncryptDESECB2Base64("hello'!@123", "basesoft"),"basesoft")

func DecryptDESECB4Hex

func DecryptDESECB4Hex(src, key string) string

des ECB hex解密: src := xcrypto.DecryptDESECB4Hex(xcrypto.EncryptDESECB2Hex("123456", "basesoft"),"basesoft")

func EncryptDESECB2Base64

func EncryptDESECB2Base64(src, key string) string

des ECB base64加密:xcrypto.EncryptDESECB2Base64("密码", "basesoft")

func EncryptDESECB2Hex

func EncryptDESECB2Hex(src, key string) string

des ECB hex加密

func PKCS5Padding

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

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) []byte

func Sha1

func Sha1(str string) string

func Sha1File

func Sha1File(path string) (string, error)

类似php的sha1_file()

func Sha1V1

func Sha1V1(str string) string

func Sha256ByByteV1

func Sha256ByByteV1(by []byte) string

func Sha256V1

func Sha256V1(str string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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