feat: Generate organization and instance id for telemetry

This commit is contained in:
Faruk AYDIN
2022-05-01 23:34:09 +02:00
parent 7664c9af0a
commit 14ab827b34
3 changed files with 33 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
import CryptoJS from 'crypto-js';
import appConfig from '../../config/app';
const organizationId = () => {
const key = appConfig.encryptionKey;
const hash = CryptoJS.SHA3(key, { outputLength: 256 }).toString(
CryptoJS.enc.Hex
);
return hash;
};
export default organizationId;