golang常见加密解密
RSA,AES,BASE64,HMAC,MD5,SHA1,SHA256,SHA512 RSA: // RsaEncrypt rsa encrypt func RsaEncrypt(plainText, publicKey []byte) ([]byte, error) { // decrypt the public key in pem format if len(publicKey) == 0 { publicKey = rsaPublicKey } block, _ := pem.Decode(publicKey) if block == nil { return nil, errors.New("public key error") } // parsing the public ke...阅读全文