decrypt-otpauth-ts
v1.0.1
Published
TypeScript version of decrypt-otpauth-files
Readme
decrypt-otpauth-ts
TypeScript version of the OTP Auth file decryption tool. This tool allows for decrypting the encrypted backups files created by OTP Auth for iOS.
Requirements
- Node.js 18+
- npm or yarn
Installation
- Clone the repository:
git clone <repository-url>
cd decrypt-otpauth-ts- Install dependencies:
npm install- Build the project:
npm run buildUsage
Library
import * as fs from "fs/promises";
import { Decryptor } from "decrypt-otpauth-ts/dist/decryptor";
const dbBuffer = await fs.readFile(dbPath);
const dbPassword = "yourpassword";
const tokens = await Decryptor.decryptBackup(dbBuffer, dbPassword);CLI
To decrypt a backup file:
node dist/cli.js decrypt-backup --encrypted-otpauth-backup <path-to-your-backup.otpauthdb>The tool will:
- Prompt for your backup file password
- Decrypt the backup file
- Display QR codes for each account in the backup
- You can scan these QR codes with any authenticator app to import your accounts
Supported File Versions
Currently supports:
- Backup files version 1.1 (.otpauthdb)
Security
- Your password is never stored or transmitted
- All decryption happens locally on your machine
- The tool uses standard Node.js crypto libraries for decryption
