- aes_setup(&csctx, 16, key, 32);
- logevent("Initialised AES-256 client->server encryption");
-}
-
-static void aes256_sckey(unsigned char *key)
-{
- aes_setup(&scctx, 16, key, 32);
- logevent("Initialised AES-256 server->client encryption");
-}
-
-static void aes_csiv(unsigned char *iv)
-{
- int i;
- for (i = 0; i < 4; i++)
- csctx.iv[i] = GET_32BIT_MSB_FIRST(iv + 4 * i);
+ AESContext *ctx = (AESContext *)handle;
+ aes_setup(ctx, 16, key, 32);