UNPKG
privacy.com
Version:
latest (1.1.1)
1.1.1
1.1.0
1.0.1
0.3.0
0.2.0
0.1.0
Wrapper for the Privacy.com API using Axios and TypeScript
jeremigendron/privacy.com
privacy.com
/
src
/
utils.ts
5 lines
(3 loc)
•
190 B
text/typescript
View Raw
1
2
3
4
5
import
*
as
crypto
from
"crypto"
;
export
const
createHmac = (
apiKey
:
string
,
data
:
object
):
string
=>
crypto.
createHmac
(
"sha256"
, apiKey).
update
(
JSON
.
stringify
(data)).
digest
(
"base64"
);