Skip to content

Add SHA-3 hash reporting support - #13

Open
MolhamHamwi wants to merge 1 commit into
amithmandassociates-oss:mainfrom
MolhamHamwi:feat/add-sha3-hash-support
Open

Add SHA-3 hash reporting support#13
MolhamHamwi wants to merge 1 commit into
amithmandassociates-oss:mainfrom
MolhamHamwi:feat/add-sha3-hash-support

Conversation

@MolhamHamwi

@MolhamHamwi MolhamHamwi commented May 10, 2026

Copy link
Copy Markdown

Summary

  • Adds a SHA-3-256 column to the evidence hash table
  • Calculates SHA-3-256 with CryptoJS using a 256-bit output length
  • Includes SHA-3-256 values in PDF, Word, CSV, and email forensic reports
  • Adds a console log when SHA-3-256 calculation completes

Verification

  • Ran node --check against the inline script extracted from index.html
  • Confirmed the new SHA-3-256 table, report, and CSV references are present

Closes #2

Copilot AI review requested due to automatic review settings May 10, 2026 22:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds SHA-3-256 hashing to the evidence workflow so the UI table and generated forensic outputs include an additional SHA-3-256 value alongside existing hashes.

Changes:

  • Added a SHA-3-256 column to the on-page evidence hash table and compute it via CryptoJS.SHA3(..., { outputLength: 256 }).
  • Included SHA-3-256 values in the Hash PDF/Word exports and in the email forensic PDF + CSV export paths.
  • Introduced a generic calculateHash helper to support SHA-256 and SHA-3-256 calculations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread index.html
<th width="25%">Filename</th>
<th width="18%">MD5 Hash</th>
<th width="32%">SHA-256 (Section 63 BSA Compliant)</th>
<th width="20%">SHA-3-256 Hash</th>
Comment thread index.html
Comment on lines 523 to +525
row.querySelector('.sha256').innerText = CryptoJS.SHA256(wordArray).toString();
row.querySelector('.sha3').innerText = CryptoJS.SHA3(wordArray, { outputLength: 256 }).toString();
console.log(`SHA-3-256 calculated for ${file.name}`);
Comment thread index.html
Comment on lines 617 to 621
const text = await readFile(files[i]);
const emailData = parseEml(text);
const sha256 = await calculateSHA256(files[i]);
const sha256 = await calculateHash(files[i], 'SHA256');
const sha3 = await calculateHash(files[i], 'SHA3-256');

Comment thread index.html
Comment on lines +904 to 914
async function calculateHash(file, algorithm = 'SHA256') {
return new Promise(resolve => {
const reader = new FileReader();
reader.onload = e => {
const wordArray = CryptoJS.lib.WordArray.create(e.target.result);
if (algorithm === 'SHA3-256') {
resolve(CryptoJS.SHA3(wordArray, { outputLength: 256 }).toString());
return;
}
resolve(CryptoJS.SHA256(wordArray).toString());
};
Comment thread index.html
Comment on lines 867 to 870
readFile(tr.fileData).then(text => {
const eml = parseEml(text);
return `${counter++},"${eml.subject}","${eml.from}","${eml.to}","${eml.date}","${eml.serverIP}","${eml.dkim}","${cells[4].innerText}"\n`;
return `${counter++},"${eml.subject}","${eml.from}","${eml.to}","${eml.date}","${eml.serverIP}","${eml.dkim}","${cells[4].innerText}","${cells[5].innerText}"\n`;
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add SHA-3 (Keccak) Hashing Support

2 participants