EncryptedTunnel(std::move(tunnelUPtr), std::move(reader), std::move(writer));
// Test writing
- for (int i = 0; i < 0x123; ++i) {
+ for (unsigned i = 0; i < 0x123; ++i) {
auto msg = CryptoBuffer{static_cast<uint8_t>(i & 0xff)};
auto paddedMsg = msg;
paddedMsg.resize(32, 0);
0x09, 0x95, 0x93, 0x04, 0xae, 0x0e, 0x91, 0x75, 0x82, 0xc0, 0xd5, 0x39}));
// Test reading and reading padding.
- for (int blocks = 0; blocks < 10; ++blocks) {
- for (int i = blocks * 32; i < (blocks + 1) * 32; ++i) {
+ for (size_t blocks = 0; blocks < 10; ++blocks) {
+ for (size_t i = blocks * 32; i < (blocks + 1) * 32; ++i) {
auto msg = Crypto::RandomBytes(i);
auto paddedMsg = msg;
paddedMsg.resize((blocks + 1) * 32);
}
// Test writing and writing padding.
- for (int blocks = 0; blocks < 10; ++blocks) {
- for (int i = blocks * 32; i < (blocks + 1) * 32; ++i) {
+ for (size_t blocks = 0; blocks < 10; ++blocks) {
+ for (size_t i = blocks * 32; i < (blocks + 1) * 32; ++i) {
auto msg = Crypto::RandomBytes(i);
auto paddedMsg = msg;
paddedMsg.resize((blocks + 1) * 32);