cryptokit

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64Decode

func Base64Decode(str string) (string, error)

Base64解密

func Base64Encode

func Base64Encode(str string) string

Base64加密

func Chr

func Chr(ascii int) string

将ASCII码值转化为字符串。 此函数与PHP的Mb_chr()函数转换结果一致,与php的chr()转换结果不一致 因为golang统一是utf-8编码,rune uses UTF-8,ASCII码值在127以下,127一下是可以和php对等,超过127的ASCII值翻译就无法对等了

func Crc32

func Crc32(str string) uint32

计算字符串的 32 位 CRC(循环冗余校验)

func DynamicDecrypt

func DynamicDecrypt(secret string, str string) string

func DynamicEncrypt

func DynamicEncrypt(secret string, str string) string

func HTTPBuildQuery

func HTTPBuildQuery(queryData url.Values) string

构造URL字符串

func Md5

func Md5(str string) string

生成MD5

func Md5File

func Md5File(path string) (string, error)

计算文件的 MD5 散列

func Rawurldecode

func Rawurldecode(str string) (string, error)

Rawurldecode()的解码

func Rawurlencode

func Rawurlencode(str string) string

遵守94年国际标准备忘录RFC 1738的URL编码,PHP中推荐使用,Rawurlencode,弃用URLEncode

func Sha1

func Sha1(str string) string

计算字符串的 SHA-1 散列

func Sha1File

func Sha1File(path string) (string, error)

计算文件的 SHA-1 散列

func URLDecode

func URLDecode(str string) (string, error)

传统URL解码

func URLEncode

func URLEncode(str string) string

传统URL编码

Types

This section is empty.

Jump to

Keyboard shortcuts

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