UNPKG

@iak-id/iak-api-server-js

Version:

Node.js-based SDK (server-side-only) to easily help integrating IAK API Services with your app.

18 lines (14 loc) 368 B
const crypto = require('crypto'); function hashSign(userHp, apikey, salt) { return crypto .createHash('md5') .update(`${userHp}${apikey}${salt}`) .digest('hex'); } function isEmptyString(string) { return (string === null || typeof string === 'undefined' || string.length === 0); } module.exports = { hashSign, isEmptyString, };