Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ErrScriptPathNotFound = errors.New("hyper-sdk: script path not found")
)
Functions ¶
func GenerateDV ¶ added in v4.2.0
GenerateDV returns the x-kpsdk-dv header value the Kasada iOS SDK (i-2.x) sends: base64 of {"osVersion":…,"hardwareId":…,"appId":…,"appVersion":…} XORed with the SDK's key.
osVersion is UIDevice.systemVersion (e.g. "18.0.1") and hardwareID is the model identifier from utsname.machine (e.g. "iPhone13,2" for an iPhone 12), not the marketing name. appID is the app's bundle id and appVersion its version string, the same values GenerateUserAgent takes, so a user-agent and a dv built from one set of inputs describe the same app and device.
Send the same value as the dv field of KasadaPayloadInput, so the payload is generated on a device with that model's screen and iOS release.
func GenerateUserAgent ¶
GenerateUserAgent returns the Kasada mobile user-agent value: the lowercase hex MD5 of "<osVersion> / <bundleID> <appVersion>". On iOS osVersion is UIDevice.systemVersion (e.g. "18.0.1") and bundleID is the app bundle id (e.g. "com.example.app"); on Android osVersion is Build.VERSION.SDK_INT (e.g. "34") and bundleID is the package name. appVersion is the app version string (e.g. "9.15.0").
Types ¶
This section is empty.