import assert from 'node:assert/strict' import test from 'node:test' import { hmacSha256Base64Url, sha256Hex } from '../src/crypto' test('sha256Hex uses the canonical lowercase digest', () => { assert.equal( sha256Hex('xuqm'), '8d7c5b94129df39d6bec13e9fed29bb15fd1715f2e75a506436d9464bd38250c', ) }) test('hmacSha256Base64Url returns an unpadded URL-safe value', () => { assert.match(hmacSha256Base64Url('secret', 'payload'), /^[A-Za-z0-9_-]+$/) })