kokke/tiny-AES-c

AES ECB buf shouldn't be const.

Closed this issue · 1 comments

void AES_ECB_encrypt(struct AES_ctx* ctx, const uint8_t* buf);
void AES_ECB_decrypt(struct AES_ctx* ctx, const uint8_t* buf);

buf shouldn't be marked as const as it's cast away right immediately in the body of those functions, right?

kokke commented

Hi @nemirst and thanks for noticing :)

I agree that it is misleading to qualify buf as const when it actually gets overwritten.

I have committed changes that remove the const-qualifier.