sqtobfuscate

package
v0.0.0-...-e1ecc37 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2023 License: MIT Imports: 5 Imported by: 0

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)

func (*Obfuscator) Obfuscate

func (o *Obfuscator) Obfuscate(srcString string) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL