仙剑4音乐加密解密代码
仙剑4的音乐为SMP格式,由MP3格式加密而来。
在mayafei大神的笔记《仙剑奇侠传4》SMP音乐解密部分研究(附源代码)基础上,我研究了加密算法,下面给出加密和解密的C语言代码。
注意:仙剑4的MP3解码功能较弱,建议将加密前的MP3先用格式工厂一类的软件重新转换过。
解密代码
1 |
|
加密代码
1 |
|
文件hash_table进行base64编码后的文本:
1 | AAAAALcdwQRuO4IJ2SZDDdx2BBNra8UXsk2GGgVQRx647QgmD/DJItbWii9hy0srZJsMNdOGzTEKoI48vb1POHDbEUzHxtBIHuCTRan9UkGsrRVfG7DUW8KWl1Z1i1ZSyDYZan8r2G6mDZtjERBaZxRAHXmjXdx9enufcM1mXnTgtiOYV6vinI6NoZE5kGCVPMAni4vd5o9S+6WC5eZkhlhbK77vRuq6NmCpt4F9aLOELS+tMzDuqeoWraRdC2ygkG0y1Cdw89D+VrDdSUtx2UwbNsf7BvfDIiC0zpU9dcoogDryn5379ka7uPvxpnn/9PY+4UPr/+WazbzoLdB97HdwhjTAbUcwGUsEPa5WxTmrBoInHBtDI8U9AC5yIMEqz52OEniATxahpgwbFrvNHxPrigGk9ksFfdAICMrNyQwHq5d4sLZWfGmQFXHejdR1292Ta2zAUm+15hFiAvvQZr9Gn14IW15a0X0dV2Zg3FNjMJtN1C1aSQ0LGUS6FthAl8alrCDbZKj5/SelTuDmoUuwob/8rWC7JYsjtpKW4rIvK62KmDZsjkEQL4P2De6H812pmURAaJ2dZiuQKnvqlOcdtOBQAHXkiSY26T479+07a7DzjHZx91VQMvriTfP+X/C8xujtfcIxyz7Phtb/y4OGuNU0m3nR7b063Fqg+9ju4AxpWf3NbYDbjmA3xk9kMpYIeoWLyX5crYpz67BLd1YNBE/hEMVLODaGRo8rR0KKewBcPWbBWORAglVTXUNRnjsdJSkm3CHwAJ8sRx1eKEJNGTb1UNgyLHabP5trWjsm1hUDkcvUB0jtlwr/8FYO+qAREE290BSUm5MZI4ZSHQ5WL/G5S+71YG2t+NdwbP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