UNPKG
simpay-typescript-api
Version:
latest (3.1.0)
3.1.0
3.0.3
3.0.2
3.0.1
3.0.0
2.3.0
2.2.4
2.2.3
2.2.1
2.2.0
2.1.2
2.1.1
2.1.0
2.0.0
SimPay.pl API wrapper
github.com/SimPaypl/SimPay-API-TypeScript
SimPaypl/SimPay-API-TypeScript
simpay-typescript-api
/
dist
/
lib
/
hashing.js
11 lines
•
284 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
import
{ createHash }
from
'node:crypto'
;
function
sha256
(
text
) {
return
hash
(
'sha256'
, text); }
function
hash
(
algorithm, text
) {
const
hash =
createHash
(algorithm); hash.
update
(text);
return
hash.
digest
(
'hex'
); }
export
{ sha256 };
//# sourceMappingURL=hashing.js.map