repo.or.cz
/
svrjs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
fix: disable legacy server-side JavaScript in webroot by default in YAML-format confi...
[svrjs.git]
/
src
/
utils
/
sha256.js
blob
326d3925592f25a2d402cc3631b94f6642a9db5d
1
const
crypto
=
require
(
"crypto"
);
2
3
// SHA256 function
4
function
sha256
(
s
) {
5
let
hash
=
crypto
.
createHash
(
"SHA256"
);
6
hash
.
update
(
s
);
7
return
hash
.
digest
(
"hex"
);
8
}
9
10
module
.
exports
=
sha256
;