mirror of
https://github.com/morgan9e/UxPlay
synced 2026-04-14 00:04:13 +09:00
add tests for examining audio decryption
This commit is contained in:
@@ -26,6 +26,8 @@
|
||||
#include "crypto.h"
|
||||
#include "compat.h"
|
||||
#include "stream.h"
|
||||
#include "global.h"
|
||||
#include "utils.h"
|
||||
|
||||
#define RAOP_BUFFER_LENGTH 32
|
||||
|
||||
@@ -149,6 +151,10 @@ raop_buffer_decrypt(raop_buffer_t *raop_buffer, unsigned char *data, unsigned ch
|
||||
}
|
||||
#endif
|
||||
|
||||
if (DECRYPTION_TEST) {
|
||||
printf("%s\n", OLD_PROTOCOL_AUDIO_CLIENT_LIST);
|
||||
printf("%d before %s", payload_size, utils_data_to_string(&data[12],16,16 ));
|
||||
}
|
||||
encryptedlen = payload_size / 16*16;
|
||||
memset(output, 0, payload_size);
|
||||
// Need to be initialized internally
|
||||
@@ -158,7 +164,10 @@ raop_buffer_decrypt(raop_buffer_t *raop_buffer, unsigned char *data, unsigned ch
|
||||
|
||||
memcpy(output + encryptedlen, &data[12 + encryptedlen], payload_size - encryptedlen);
|
||||
*outputlen = payload_size;
|
||||
|
||||
if (DECRYPTION_TEST){
|
||||
if ( !(output[0] == 0x8d || output[0] == 0x8e || output[0] == 0x20)) printf("***ERROR AUDIO FRAME IS NOT AAC_ELD OR ALAC\n");
|
||||
printf("%d after %s\n", payload_size, utils_data_to_string(output,16,16 ));
|
||||
}
|
||||
#ifdef DUMP_AUDIO
|
||||
// Decrypted file
|
||||
if (file_aac != NULL) {
|
||||
|
||||
Reference in New Issue
Block a user