MCPcopy Index your code
hub / github.com/FlowiseAI/Flowise / getEncryptionKeyFilePath

Function getEncryptionKeyFilePath

packages/components/src/utils.ts:550–568  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

548 * @returns {string}
549 */
550const getEncryptionKeyFilePath = (): string => {
551 const checkPaths = [
552 path.join(__dirname, '..', '..', 'encryption.key'),
553 path.join(__dirname, '..', '..', 'server', 'encryption.key'),
554 path.join(__dirname, '..', '..', '..', 'encryption.key'),
555 path.join(__dirname, '..', '..', '..', 'server', 'encryption.key'),
556 path.join(__dirname, '..', '..', '..', '..', 'encryption.key'),
557 path.join(__dirname, '..', '..', '..', '..', 'server', 'encryption.key'),
558 path.join(__dirname, '..', '..', '..', '..', '..', 'encryption.key'),
559 path.join(__dirname, '..', '..', '..', '..', '..', 'server', 'encryption.key'),
560 path.join(getUserHome(), '.flowise', 'encryption.key')
561 ]
562 for (const checkPath of checkPaths) {
563 if (fs.existsSync(checkPath)) {
564 return checkPath
565 }
566 }
567 return ''
568}
569
570export const getEncryptionKeyPath = (): string => {
571 return process.env.SECRETKEY_PATH ? path.join(process.env.SECRETKEY_PATH, 'encryption.key') : getEncryptionKeyFilePath()

Callers 1

getEncryptionKeyPathFunction · 0.85

Calls 1

getUserHomeFunction · 0.70

Tested by

no test coverage detected