init
This commit is contained in:
16
debug_hash.js
Normal file
16
debug_hash.js
Normal file
@@ -0,0 +1,16 @@
|
||||
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('---');
|
||||
});
|
||||
Reference in New Issue
Block a user