Documentation ¶
Index ¶
- type CookieCloudDecodeData
- type CookieCloudRs
- type CookieCloudSDK
- func (this *CookieCloudSDK) AesDecrypt(data, key, iv []byte) ([]byte, error)
- func (this *CookieCloudSDK) AesEncrypt(data, key, iv []byte) ([]byte, error)
- func (this *CookieCloudSDK) Decrypt(passphrase, encryptedData string) ([]byte, error)
- func (this *CookieCloudSDK) GetCookie() (CookieCloudDecodeData, error)
- type CookieData
- type LocalStorageData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CookieCloudDecodeData ¶
type CookieCloudDecodeData struct { CookieData map[string][]CookieData `json:"cookie_data"` LocalStorageData map[string]LocalStorageData `json:"local_storage_data"` }
解密后的数据结构
type CookieCloudSDK ¶
type CookieCloudSDK struct { Url string // 服务器地址 UUID string // UUID 用户KEY Password string // 密码 端对端加密密码 }
func NewCookieCloudSDK ¶
func NewCookieCloudSDK(host, uuid, password string) (*CookieCloudSDK, error)
func (*CookieCloudSDK) AesDecrypt ¶
func (this *CookieCloudSDK) AesDecrypt(data, key, iv []byte) ([]byte, error)
func (*CookieCloudSDK) AesEncrypt ¶
func (this *CookieCloudSDK) AesEncrypt(data, key, iv []byte) ([]byte, error)
func (*CookieCloudSDK) Decrypt ¶
func (this *CookieCloudSDK) Decrypt(passphrase, encryptedData string) ([]byte, error)
Decrypt 解密
func (*CookieCloudSDK) GetCookie ¶
func (this *CookieCloudSDK) GetCookie() (CookieCloudDecodeData, error)
GetCookie 获取解密后的数据
type CookieData ¶
type CookieData struct { Domain string `json:"domain"` ExpirationDate float64 `json:"expirationDate"` HostOnly bool `json:"hostOnly"` HttpOnly bool `json:"httpOnly"` Name string `json:"name"` Path string `json:"path"` SameSite string `json:"sameSite"` Secure bool `json:"secure"` Session bool `json:"session"` StoreId string `json:"storeId"` Value string `json:"value"` }
type LocalStorageData ¶
type LocalStorageData struct {
IsWhitelist string `json:"isWhitelist"`
}
Click to show internal directories.
Click to hide internal directories.