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

Function AES_CBC_encrypt_buffer

payload.cpp:607–620  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

605}
606
607void AES_CBC_encrypt_buffer(struct AES_ctx *ctx, uint8_t* buf, size_t length)
608{
609 size_t i;
610 uint8_t *Iv = ctx->Iv;
611 for (i = 0; i < length; i += AES_BLOCKLEN)
612 {
613 XorWithIv(buf, Iv);
614 Cipher((state_t*)buf, ctx->RoundKey);
615 Iv = buf;
616 buf += AES_BLOCKLEN;
617 }
618 /* store Iv in ctx for next call */
619 memcpy(ctx->Iv, Iv, AES_BLOCKLEN);
620}
621
622void AES_CBC_decrypt_buffer(struct AES_ctx* ctx, uint8_t* buf, size_t length)
623{

Callers 1

encryptMethod · 0.85

Calls 2

XorWithIvFunction · 0.85
CipherFunction · 0.85

Tested by

no test coverage detected