Skip to content

Instantly share code, notes, and snippets.

View elis's full-sized avatar
💜
Doing Open-source

Eli Sklar elis

💜
Doing Open-source
View GitHub Profile
@elis
elis / nodejs.signfile.js
Created March 23, 2021 21:16 — forked from zfael/nodejs.signfile.js
Node.JS - CRYPTO How to sign a file
//how to execute: node sign.js <path file> <path private key>
//output: signature of file
var crypto = require('crypto');
var fs = require('fs');
var args = process.argv.slice(2);
var fileName = args[0];
var keyPath = args[1];
//openssl genrsa -out key.pem 1024