Documentation ¶
Overview ¶
Package sqtobfuscate implements the API request obfuscation required by Meituan / Dianping BEP API.
The official documentation uses "signing" and "encryption" in a rather unclear way, and the algorithm described in the documentation is nether signing (no integrity verification, you can change the result without knowing the secret key) nor encryption (known-plaintext attack possible) at all, thus we call it obfuscation here.
Documentation: https://h5.dianping.com/app/bep-docs/sky-doc/api.html#_1-4-%E7%AD%BE%E5%90%8D%E6%96%B9%E6%B3%95
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Obfuscator ¶
type Obfuscator struct {
SecretKey string
}
func (*Obfuscator) Deobfuscate ¶
func (o *Obfuscator) Deobfuscate(srcString string) (string, error)
Click to show internal directories.
Click to hide internal directories.