(body: string, secret: string | Buffer)
| 9 | * {@link ../compare | safeCompare} for timing-safe comparison. |
| 10 | */ |
| 11 | export function hmacSha256Hex(body: string, secret: string | Buffer): string { |
| 12 | return createHmac('sha256', secret).update(body, 'utf8').digest('hex') |
| 13 | } |
| 14 | |
| 15 | /** |
| 16 | * HMAC-SHA256 of a UTF-8 body using the given secret, base64-encoded. Use for |
no outgoing calls
no test coverage detected