1.0.1 • Published 6 months ago

decrypt-otpauth-ts v1.0.1

Weekly downloads
-
License
-
Repository
-
Last release
6 months ago

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

  1. Clone the repository:
git clone <repository-url>
cd decrypt-otpauth-ts
  1. Install dependencies:
npm install
  1. Build the project:
npm run build

Usage

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: 1. Prompt for your backup file password 2. Decrypt the backup file 3. Display QR codes for each account in the backup 4. 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