Skip to content

Instantly share code, notes, and snippets.

@mairh
Created February 12, 2024 14:29
Show Gist options
  • Save mairh/14e260082abc13d7e20fff0587a622ab to your computer and use it in GitHub Desktop.
Save mairh/14e260082abc13d7e20fff0587a622ab to your computer and use it in GitHub Desktop.
EM3.Example of creating HMAC
const secretKey: string = "xxxxx";
const kela: string = "0123";
const timestamp: number = new Date().getTime();
const cryptoHmac: string = crypto.createHmac('sha256', secretKey).update(`${kela}:${timestamp}`).digest('hex');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment