本文整理汇总了C++中AES::cbc_decrypt方法的典型用法代码示例。如果您正苦于以下问题:C++ AES::cbc_decrypt方法的具体用法?C++ AES::cbc_decrypt怎么用?C++ AES::cbc_decrypt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AES
的用法示例。
在下文中一共展示了AES::cbc_decrypt方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: transportReceive
uint8_t transportReceive(void* data) {
uint8_t len = _rf24.getDynamicPayloadSize();
_rf24.read(data, len);
#if defined(MY_RF24_ENABLE_ENCRYPTION)
_aes.set_IV(0);//not sure if necessary
_aes.cbc_decrypt((byte*)(data), (byte*)(data), len>16?2:1); // decrypt
#endif
return len;
}
示例2: transportReceive
uint8_t transportReceive(void* data) {
uint8_t len = RF24_readMessage(data);
#if defined(MY_RF24_ENABLE_ENCRYPTION)
// has to be adjusted, WIP!
_aes.set_IV(0);
// decrypt data
_aes.cbc_decrypt((byte*)(data), (byte*)(data), len>16?2:1);
#endif
return len;
}
示例3: transportReceive
uint8_t transportReceive(void *data)
{
uint8_t len = 0;
#if defined(MY_RX_MESSAGE_BUFFER_FEATURE)
transportQueuedMessage* msg = transportRxQueue.getBack();
if (msg) {
len = msg->m_len;
(void)memcpy(data, msg->m_data, len);
(void)transportRxQueue.popBack();
}
#else
len = RF24_readMessage(data);
#endif
#if defined(MY_RF24_ENABLE_ENCRYPTION)
// has to be adjusted, WIP!
RF24_aes.set_IV(0);
// decrypt data
if (RF24_aes.cbc_decrypt((uint8_t *)data, (uint8_t *)data, len > 16 ? 2 : 1) != AES_SUCCESS) {
len = 0;
}
#endif
return len;
}