Nodejs vs Rust sha256 for images

Issue was between the keyboard and the screen :man_facepalming:.

Should not have converted the buffer to string in NodeJS.

const computeSha256 = async (file: string): Promise<string> => {
  const buffer = await readFile(file);
  return crypto.createHash('sha256').update(buffer).digest('base64');
};
3 Likes