bada-terminal / src /utils /execution-fingerprint.js
VanyaJ's picture
Release BADA Terminal v2.1.0 (Enterprise Ontology, NVIDIA auto-ontology, Release Preflight)
d739b1b verified
Raw History Blame Contribute Delete
494 Bytes
/** 프로필·CLI·환경·폴더가 달라진 실행에 이전 PTY를 재사용하지 않는다. 원문 비밀은 저장하지 않는다. */
const crypto = require('crypto');
function executionFingerprint({ command, args, cwd, env, profile }) {
const environment = Object.keys(env || {}).sort().map(key => [key, env[key]]);
return crypto.createHash('sha256').update(JSON.stringify({ command, args, cwd, environment, profile })).digest('hex');
}
module.exports = { executionFingerprint };