Documentation ¶
Index ¶
- Constants
- func AesDecode(encryptedString string) (string, error)
- func AesEncode(rawString string) (string, error)
- func Base64Decode(encodedString string) ([]byte, error)
- func Base64Encode(rawBytes []byte) string
- func FileExists(dst string) bool
- func FileExistsWithError(dst string) (bool, error)
- func FileExt(filename string) string
- func FileGetContents(filename string) ([]byte, error)
- func FilePutContents(content []byte, dst string) error
- func ListeningExitSignal(logger *zap.Logger, wg *sync.WaitGroup)
- func MD5Encrypt(rawString string) string
- func RSADecrypt(encodedString string, privateKey []byte) (string, error)
- func RSAEncrypt(rawString string, publicKey []byte) (string, error)
- func RSASign(rawStringBytes, privateKey []byte) (string, error)
- func RSAVerifySign(rawStringBytes, sign, publicKey []byte) (bool, error)
- func SaveFile2Dst(file *multipart.FileHeader, dst string) error
Constants ¶
View Source
const KEY = "fakeKeyChangeMe!"
KEY 密钥
Variables ¶
This section is empty.
Functions ¶
func ListeningExitSignal ¶
ListeningExitSignal 监听系统退出信号
func RSADecrypt ¶
RSADecrypt rsa解密
func RSAEncrypt ¶
RSAEncrypt rsa加密
func RSAVerifySign ¶
RSAVerifySign rsa验签
func SaveFile2Dst ¶
func SaveFile2Dst(file *multipart.FileHeader, dst string) error
SaveFile2Dst 将文件保存到目标地址(拷贝文件)
file *multipart.FileHeader 文件
dst string 拷贝到的目标地址
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.