Documentation ¶
Index ¶
- func AesDecryptCBC(encrypted []byte, key []byte) (decrypted []byte)
- func AesEncryptCBC(origData []byte, key []byte) (encrypted []byte)
- func GenerateRSAKey(bits int) (err error, publicKeyText []byte, privateKeyText []byte)
- func GenerateRSAKeyFile(bits int, savedKeyFilePath string) (err error)
- func Md5Crypt(str string, salt ...interface{}) (CryptStr string)
- func RSADecryptFromPemText(cipherText []byte, pemFileText []byte) (plainText []byte, err error)
- func RandomString(length int) string
- func SocketReceive(conn *websocket.Conn) ([]byte, error)
- func SocketSend(conn *websocket.Conn, byteData []byte) error
- func UniqueId() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AesDecryptCBC ¶
func AesEncryptCBC ¶
=================== CBC ======================
func GenerateRSAKey ¶
GenerateRSAKey 生成RSA私钥和公钥,保存到文件中
func GenerateRSAKeyFile ¶
GenerateRSAKeyFile 生成RSA私钥和公钥,保存到文件中
func RSADecryptFromPemText ¶
RSADecryptFromPemText RSA解密
func RandomString ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.