qrc-decoder
v1.0.0
Published
A TypeScript library for encrypting and decrypting QRC lyrics format.
Maintainers
Readme
QRC Decoder
A TypeScript library for encrypting and decrypting QRC lyrics format.
⚠️ Security Warning
This library implements a non-standard, proprietary algorithm that was reverse-engineered from a specific application. It is NOT a standard implementation of DES or 3DES.
DO NOT use this library for any general-purpose security or cryptographic needs. It is intended only for achieving interoperability with the QRC format.
Installation
Install the package using your favorite package manager.
npm:
npm install qrc-decoderyarn:
yarn add qrc-decoderUsage
The library exports two main functions, decryptQrc and encryptQrc.
import { decryptQrc, encryptQrc } from 'qrc-decoder';
const encryptedHex = '...';
try {
const decrypted = decryptQrc(encryptedHex);
console.log('Decrypted Lyrics:\n', decrypted);
} catch (error) {
console.error('Decryption failed:', error);
}API Reference
decryptQrc(encryptedHexString: string): string
Takes a hexadecimal string of encrypted QRC data and returns the decrypted plaintext lyrics as a UTF-8 string. Throws an error if the input is malformed or decryption fails.
encryptQrc(plaintext: string): string
Takes a plaintext lyric string (UTF-8) and returns a hexadecimal string of the encrypted QRC data.
Acknowledgements
This TypeScript project is a port of the LyricDecoder project by SuJiKiNen.
All credit for the original reverse-engineering and algorithm implementation goes to the author of that project. You can find the original repository here: https://github.com/SuJiKiNen/LyricDecoder
License
This project is licensed under the MIT License. See the LICENSE file for details.
