UNPKG
@nwpr/pass-js
Version:
latest (7.0.2)
7.0.2
7.0.1
7.0.0
Apple Wallet Pass generating and pushing updates from Node.js
github.com/nwpr/pass-js
nwpr/pass-js
@nwpr/pass-js
/
dist
/
lib
/
getBufferHash.js
13 lines
•
289 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
import
{ createHash }
from
'crypto'
;
/** * *
@param
{
Buffer
}
buffer
*
@returns
{
string
} */
export
function
getBufferHash
(
buffer
) {
// creating hash
const
sha =
createHash
(
'sha1'
); sha.
update
(buffer);
return
sha.
digest
(
'hex'
); }
//# sourceMappingURL=getBufferHash.js.map