16 lines
590 B
JavaScript
16 lines
590 B
JavaScript
const jdenticon = require('./jdenticon-js/dist/jdenticon-node.js');
|
|
const crypto = require('crypto');
|
|
|
|
const testInputs = ['test-hash', 'example1@gmail.com'];
|
|
|
|
testInputs.forEach(input => {
|
|
// Generate hash using Node.js crypto (similar to what our Go code should do)
|
|
const nodeHash = crypto.createHash('sha1').update(input).digest('hex');
|
|
console.log(`Input: "${input}"`);
|
|
console.log(`Node.js SHA1: ${nodeHash}`);
|
|
|
|
// See what Jdenticon generates
|
|
const svg = jdenticon.toSvg(input, 64);
|
|
console.log(`SVG length: ${svg.length}`);
|
|
console.log('---');
|
|
}); |