#External Hashers — Recipes
#Whirlpool via CDN (512-bit, hex output)
const signer = new UldaSign({
sign: {
N: 5, mode: 'X',
hash: 'WHIRLPOOL',
originSize: 512,
cdn: 'https://cdn.example.com/whirlpool.js',
output: 'hex',
size: 512
}
});
#BLAKE3 via direct function (bytes output)
import { blake3 } from '@noble/hashes/blake3';
const signer = new UldaSign({
fmt : { export: 'bytes' },
sign: {
N: 8, mode: 'S',
hash: 'B3FAST',
originSize: 256,
func : async u8 => blake3(u8),
output: 'bytes',
size : 256
}
});
#Bulk map with several candidates
new UldaSign({
sign: { hash: 'FALCON-256', originSize: 256 },
externalHashers: {
'FALCON-256': {
cdn: 'https://cdn.example.com/falcon256.js',
output: 'bytes',
size: 256
},
'SPHINCS-SHAKE': {
cdn: 'https://cdn.example.com/sphincs-shake.js',
output: 'bytes',
size: 256
},
'KECCAK-384': {
func : async u8 => keccak384(u8),
output: 'hex',
size : 384
}
}
});