Skip to content

Instantly share code, notes, and snippets.

@MarkTiedemann
Created April 11, 2022 20:48
Show Gist options
  • Select an option

  • Save MarkTiedemann/8c41938c1224c8d2a3f7271afe184acc to your computer and use it in GitHub Desktop.

Select an option

Save MarkTiedemann/8c41938c1224c8d2a3f7271afe184acc to your computer and use it in GitHub Desktop.
// Usage: node sha384.mjs <file>
import fs from "node:fs";
import crypto from "node:crypto";
import process from "node:process";
console.log(
"sha384-" + crypto
.createHash("sha384")
.update(
fs.readFileSync(process.argv[2])
)
.digest("base64"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment