Skip to content

Instantly share code, notes, and snippets.

@mairh
Created February 12, 2024 13:53
Show Gist options
  • Save mairh/3d0c557599fd0358839e930f004b2926 to your computer and use it in GitHub Desktop.
Save mairh/3d0c557599fd0358839e930f004b2926 to your computer and use it in GitHub Desktop.
PD3.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