mirror of
https://github.com/PretendoNetwork/BOSS.git
synced 2026-03-21 17:34:19 -05:00
chore: remove deprecated script
This commit is contained in:
parent
dc471eefa9
commit
8cf212aed5
|
|
@ -1,22 +0,0 @@
|
|||
const BOSS = require('boss-js');
|
||||
const path = require('path');
|
||||
const fs = require('fs-extra');
|
||||
const crypto = require('crypto');
|
||||
require('dotenv').config();
|
||||
|
||||
const { PN_BOSS_CONFIG_BOSS_WIIU_AES_KEY, PN_BOSS_CONFIG_BOSS_WIIU_HMAC_KEY } = process.env;
|
||||
|
||||
const decryptedFilePath = path.normalize(path.resolve(__dirname, process.argv[2]));
|
||||
const encryptedFolderName = path.basename(path.dirname(decryptedFilePath));
|
||||
const encryptedFolderPath = path.normalize(path.resolve(decryptedFilePath, '../../../encrypted', encryptedFolderName));
|
||||
|
||||
fs.ensureDirSync(encryptedFolderPath);
|
||||
|
||||
const encryptedContents = BOSS.encryptWiiU(decryptedFilePath, PN_BOSS_CONFIG_BOSS_WIIU_AES_KEY, PN_BOSS_CONFIG_BOSS_WIIU_HMAC_KEY);
|
||||
const hash = crypto.createHash('md5').update(encryptedContents).digest('hex');
|
||||
|
||||
const encryptedFilePath = path.normalize(path.resolve(encryptedFolderPath, hash));
|
||||
|
||||
fs.writeFileSync(encryptedFilePath, encryptedContents);
|
||||
|
||||
console.log(`Encrypted ${process.argv[2].split('/').pop()} to ${encryptedFilePath}, (Length ${encryptedContents.length})`);
|
||||
Loading…
Reference in New Issue
Block a user