gistlib
index.tsimport { createHash } from 'crypto'; // Generate hashes for comparison const hash1 = createHash('sha256').update('hello').digest('hex'); const hash2 = createHash('sha256').update('hello').digest('hex'); // Compare hashes if (hash1 === hash2) { console.log('Hashes are equal'); } else { console.log('Hashes are not equal'); } 335 chars13 lines
import { createHash } from 'crypto'; // Generate hashes for comparison const hash1 = createHash('sha256').update('hello').digest('hex'); const hash2 = createHash('sha256').update('hello').digest('hex'); // Compare hashes if (hash1 === hash2) { console.log('Hashes are equal'); } else { console.log('Hashes are not equal'); }
gistlibby LogSnag