feat: Convert helpers to use JS files
This commit is contained in:
13
packages/backend/src/helpers/telemetry/organization-id.js
Normal file
13
packages/backend/src/helpers/telemetry/organization-id.js
Normal 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;
|
Reference in New Issue
Block a user