mirror of
https://git.undefined-dev.fr/Blendman974/faceclaw.git
synced 2026-11-29 13:03:11 +00:00
EvenHub compatibility for iOS
This commit is contained in:
1 parent
617cdc39eb
commit
7e58c7c05f
40 files changed
+629
-176
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import { getStringSetting, setStringSetting } from "../../native/settings-store";
|
||||
declare const FaceclawCrypto: any;
|
||||
|
||||
export function hmacSha256Base64(secret: string, message: string): string {
|
||||
return FaceclawCrypto.hmacSha256Message(secret, message);
|
||||
}
|
||||
|
||||
/** A stable random terminal ID, independent of phone hardware identifiers. */
|
||||
export function getPhoneOpenUdid(): string {
|
||||
const key = "integrations.evenhub.terminalId";
|
||||
let id = getStringSetting(key, "");
|
||||
if (!id) {
|
||||
id = NSUUID.UUID().UUIDString.replace(/-/g, "").slice(0, 16).toLowerCase();
|
||||
setStringSetting(key, id);
|
||||
}
|
||||
return id;
|
||||
}
|
||||
Reference in new issue
Block a user