strutil

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecrypt

func AesDecrypt(encrypted, cip string) (string, error)

*

  • @name: aes 解密
  • @description:
  • @param {*} encrypted 加密字符串
  • @param {string} cip 密文
  • @return {*}

func AesEncrypt

func AesEncrypt(origin, cip string) (string, error)

*

  • @name: AES加密 cbc
  • @description:
  • @param {*} origin 需要加密的字符串
  • @param {string} cip 密文
  • @return {*}

func Base64Decoding

func Base64Decoding(s string) string

func Base64Encoding

func Base64Encoding(s string) string

base64 加密

func GetRandomNumber

func GetRandomNumber(l int) string

随机生成数字字符串

func GetRandomPureString

func GetRandomPureString(l int) string

随机生成纯字符串

func GetRandomString

func GetRandomString(l int) string

随机生成字符串

func JoinStringArr

func JoinStringArr(strs, str string, dep string) string

*

  • @name: 向字符串增加字符
  • @description:
  • @param {*} strs 使用dep隔开的字符串
  • @param {string} str 需要添加的字符串
  • @param {string} dep
  • @return {*}

func Md5

func Md5(s string) string

func PKCS7Padding

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

func Sha1

func Sha1(s string) string

func UnPKCS7Padding

func UnPKCS7Padding(origData []byte) []byte

func Uuid

func Uuid() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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