mock.c (fdcd1130d4a6f43f510a930d5299da11988c895d) | mock.c (e2bc2c157b20cb9af34335bc38fcd56d216e67bb) |
---|---|
1#include <stdint.h> 2#include <stdio.h> 3#include <stdlib.h> 4#include <string.h> 5 6#include <btstack/btstack.h> 7#include "att.h" 8#include "hci.h" --- 100 unchanged lines hidden (view full) --- 109 if (cmd->opcode == hci_le_encrypt.opcode){ 110 uint8_t * key_flipped = &cmd_buffer[3]; 111 uint8_t * plaintext_flipped = &cmd_buffer[19]; 112 uint8_t key[16]; 113 uint8_t plaintext[16]; 114 swap128(key_flipped, key); 115 swap128(plaintext_flipped, plaintext); 116 printf("le_encrypt key "); | 1#include <stdint.h> 2#include <stdio.h> 3#include <stdlib.h> 4#include <string.h> 5 6#include <btstack/btstack.h> 7#include "att.h" 8#include "hci.h" --- 100 unchanged lines hidden (view full) --- 109 if (cmd->opcode == hci_le_encrypt.opcode){ 110 uint8_t * key_flipped = &cmd_buffer[3]; 111 uint8_t * plaintext_flipped = &cmd_buffer[19]; 112 uint8_t key[16]; 113 uint8_t plaintext[16]; 114 swap128(key_flipped, key); 115 swap128(plaintext_flipped, plaintext); 116 printf("le_encrypt key "); |
117 hexdump(key_flipped, 16); | 117 hexdump(key, 16); |
118 printf("le_encrypt txt "); | 118 printf("le_encrypt txt "); |
119 hexdump(plaintext_flipped, 16); | 119 hexdump(plaintext, 16); |
120 aes128_calc_cyphertext(key, plaintext, aes128_cyphertext); 121 printf("le_encrypt res "); 122 hexdump(aes128_cyphertext, 16); 123 } 124 return 0; 125} 126 127 --- 55 unchanged lines hidden --- | 120 aes128_calc_cyphertext(key, plaintext, aes128_cyphertext); 121 printf("le_encrypt res "); 122 hexdump(aes128_cyphertext, 16); 123 } 124 return 0; 125} 126 127 --- 55 unchanged lines hidden --- |