MCPcopy Create free account
hub / github.com/S3N4T0R-0X0/PixelCode-Attack / AES_CBC_decrypt_buffer

Function AES_CBC_decrypt_buffer

payload.cpp:622–635  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

620}
621
622void AES_CBC_decrypt_buffer(struct AES_ctx* ctx, uint8_t* buf, size_t length)
623{
624 size_t i;
625 uint8_t storeNextIv[AES_BLOCKLEN];
626 for (i = 0; i < length; i += AES_BLOCKLEN)
627 {
628 memcpy(storeNextIv, buf, AES_BLOCKLEN);
629 InvCipher((state_t*)buf, ctx->RoundKey);
630 XorWithIv(buf, ctx->Iv);
631 memcpy(ctx->Iv, storeNextIv, AES_BLOCKLEN);
632 buf += AES_BLOCKLEN;
633 }
634
635}
636
637#endif // #if defined(CBC) && (CBC == 1)
638

Callers 1

decryptMethod · 0.85

Calls 2

InvCipherFunction · 0.85
XorWithIvFunction · 0.85

Tested by

no test coverage detected