This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Forked 'toFloat' from https://gist.github.com/laerciobernardo/498f7ba1c269208799498ea8805d8c30 | |
// Forked 'toHex' from stackoverflow answer https://stackoverflow.com/a/47187116/10522253 | |
// Modifyed by: Jozo132 (https://github.com/Jozo132) | |
const Float32ToHex = (float32) => { | |
const getHex = i => ('00' + i.toString(16)).slice(-2); | |
var view = new DataView(new ArrayBuffer(4)) | |
view.setFloat32(0, float32); | |
return Array.apply(null, { length: 4 }).map((_, i) => getHex(view.getUint8(i))).join(''); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |