Documentation ¶
Index ¶
- Constants
- func ConvertByte2String(byte []byte, charset Charset) string
- func GetSha512Hash(data []byte) []byte
- type AesScheme
- type Charset
- type CryptoScheme
- func (s *CryptoScheme) CheckAes() (err error)
- func (s *CryptoScheme) DecryptString(data string) (dst string, err error)
- func (s *CryptoScheme) EncryptString(data string) (dst string, err error)
- func (s *CryptoScheme) EqualAesKey(aesKey string) bool
- func (s *CryptoScheme) SetAesKey(aesKey string) (bool, error)
- type CustomBase64
Constants ¶
View Source
const ( UTF8 = Charset("UTF-8") GB18030 = Charset("GB18030") )
Variables ¶
This section is empty.
Functions ¶
func ConvertByte2String ¶
Types ¶
type AesScheme ¶
func DefaultAesScheme ¶
func DefaultAesScheme() *AesScheme
func NewAesScheme ¶
func (*AesScheme) DecryptString ¶
type CryptoScheme ¶
type CryptoScheme struct { OriginalAesKey string RealAesKey []byte RealAesIv []byte // contains filtered or unexported fields }
CryptoScheme 加密策略
func NewCryptoScheme ¶
func NewCryptoScheme(publicKey string) *CryptoScheme
func (*CryptoScheme) DecryptString ¶
func (s *CryptoScheme) DecryptString(data string) (dst string, err error)
DecryptString 解密
func (*CryptoScheme) EncryptString ¶
func (s *CryptoScheme) EncryptString(data string) (dst string, err error)
EncryptString 加密
func (*CryptoScheme) EqualAesKey ¶
func (s *CryptoScheme) EqualAesKey(aesKey string) bool
EqualAesKey 对比aes 是否一致
type CustomBase64 ¶
type CustomBase64 struct {
// contains filtered or unexported fields
}
CustomBase64 自定义base64
func NewCustomBase64 ¶
func NewCustomBase64(base64Tables ...string) *CustomBase64
NewCustomBase64 新自定义base64
Click to show internal directories.
Click to hide internal directories.