Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jolle/abitti-meb-decryptor
🔑 Decrypts files generated by oma.abitti.fi
https://github.com/jolle/abitti-meb-decryptor
Last synced: about 1 month ago
JSON representation
🔑 Decrypts files generated by oma.abitti.fi
- Host: GitHub
- URL: https://github.com/jolle/abitti-meb-decryptor
- Owner: jolle
- License: mit
- Created: 2020-05-28T12:48:20.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-01T19:13:07.000Z (almost 2 years ago)
- Last Synced: 2023-11-09T13:14:29.867Z (about 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 11.2 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# abitti-meb-decryptor
Decrypts meb/mex files that are generated by the oma.abitti.fi service and used by the Abitti examination OS.
## Example
```ts
import { decryptExamFile } from "abitti-meb-decryptor";
import { readFileSync } from "fs";console.log(
decryptExamFile(
readFileSync("my-exam-file.meb"),
"my super secure passphrase",
),
);
```## Usage
### `async decryptExamFile(encryptedFile: Buffer, password: string, signaturePublicKey?: Buffer) ⇒ DecryptedFiles`
Decrypts the given MEB/MEX file with the given password. The signatures of the inner files will be validated with a public key if a public key is given. If no public key is given, signature checking is skipped. An exam.json file (for MEB files) or an exam.xml file (for MEX files) should exist inside; otherwise, an error is thrown.
### `DecryptedFiles`
The decrypted inner files are represented as an object where the keys are the filenames of the inner files (e.g. "exam.xml") and the value is the file content as a buffer.
### `async decryptExamFileRaw(encryptedFile: Buffer, password: string, signaturePublicKey?: Buffer) ⇒ Record`
If the file structure inside the exam file changes significantly (i.e., if there isn't a exam.json/exam.xml file), it is possible to use this function as validation of the file structure is skipped here.