跳转至

File qmc.h

FileList > crypto > qmc.h

Go to the source code of this file

QQ音乐加密文件解码器核心模块 More...

  • #include <cstdint>
  • #include <memory>
  • #include <qqmusic/crypto/cipher_map.h>
  • #include <qqmusic/crypto/cipher_rc4.h>
  • #include <qqmusic/crypto/cipher_tea.h>
  • #include <qqmusic/crypto/key_derive.h>
  • #include <qqmusic/details/result.h>
  • #include <qqmusic/utils/buffer.h>
  • #include <vector>

Namespaces

Type Name
namespace qqmusic
namespace crypto

Classes

Type Name
class Decoder

Detailed Description

Author:

kingpoem

Version:

0.2

Date:

2025-03-26 将API请求得到的ekey存取到解码器的ekey中,根据长度选择解密算法(>300字节为RC4,其他为MapCipher) 将解密后的密钥存取到key中,完成解密过程 需要解密的数据存取到buf_in中,解密完成的数据存取到buf_out中

Copyright:

Copyright (c) 2025

See also: https://git.unlock-music.dev/um/cli/src/branch/main/algo/qmc/qmc.go

SongInfo song = ...;
qqmusic::crypto::Decoder decoder;
if (song.ekey.has_value()) {
     auto res = decoder.decrypto(ekey, buf);
}

Note:

该接口未测试,暂不可用


The documentation for this class was generated from the following file include/qqmusic/crypto/qmc.h