import numberfy from "./numberfy"; /** * # Grab Encryption Keys * @description Grab Required Encryption Keys */ export default function grabKeys(param) { return { key: (param === null || param === void 0 ? void 0 : param.encryptionKey) || process.env.DSQL_ENCRYPTION_PASSWORD, keyLen: process.env.DSQL_ENCRYPTION_KEY_LENGTH ? Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH) : 24, salt: (param === null || param === void 0 ? void 0 : param.encryptionSalt) || process.env.DSQL_ENCRYPTION_SALT, apiKey: (param === null || param === void 0 ? void 0 : param.apiKey) || process.env.DSQL_API_KEY, algorithm: (param === null || param === void 0 ? void 0 : param.algorithm) || process.env.DSQL_ENCRYPTION_ALGORITHM || "aes-192-cbc", bufferAllocSize: (param === null || param === void 0 ? void 0 : param.bufferAllocSize) || (process.env.DSQL_ENCRYPTION_BUFFER_ALLOCATION_SIZE ? numberfy(process.env.DSQL_ENCRYPTION_BUFFER_ALLOCATION_SIZE) : undefined) || 16, }; }