Commit 08497428 authored by Nick Knudson's avatar Nick Knudson
Browse files

CTR-only mode still needs functions to update counter (iv)

parent ddd84d37
......@@ -226,7 +226,7 @@ void AES_init_ctx(struct AES_ctx* ctx, const uint8_t* key)
{
KeyExpansion(ctx->RoundKey, key);
}
#if defined(CBC) && (CBC == 1)
#if (defined(CBC) && (CBC == 1)) || (defined(CTR) && (CTR == 1))
void AES_init_ctx_iv(struct AES_ctx* ctx, const uint8_t* key, const uint8_t* iv)
{
KeyExpansion(ctx->RoundKey, key);
......
......@@ -49,7 +49,7 @@ struct AES_ctx
};
void AES_init_ctx(struct AES_ctx* ctx, const uint8_t* key);
#if defined(CBC) && (CBC == 1)
#if (defined(CBC) && (CBC == 1)) || (defined(CTR) && (CTR == 1))
void AES_init_ctx_iv(struct AES_ctx* ctx, const uint8_t* key, const uint8_t* iv);
void AES_ctx_set_iv(struct AES_ctx* ctx, const uint8_t* iv);
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment