Lines Matching defs:dctx
105 var_expand_crypt(struct dcrypt_context_symmetric *dctx, buffer_t *key, buffer_t *iv,
110 dcrypt_ctx_sym_set_key_iv_random(dctx);
112 dcrypt_ctx_sym_get_iv(dctx, iv);
113 } else if (dcrypt_ctx_sym_get_iv_length(dctx) != iv->used) {
116 dcrypt_ctx_sym_get_iv_length(dctx));
119 dcrypt_ctx_sym_set_iv(dctx, iv->data, iv->used);
122 if (dcrypt_ctx_sym_get_key_length(dctx) != key->used) {
125 dcrypt_ctx_sym_get_key_length(dctx));
128 dcrypt_ctx_sym_set_key(dctx, key->data, key->used);
131 if (!dcrypt_ctx_sym_init(dctx, error_r) ||
132 !dcrypt_ctx_sym_update(dctx, input->data,
134 !dcrypt_ctx_sym_final(dctx, output, error_r))
182 struct dcrypt_context_symmetric *dctx;
183 if (!dcrypt_ctx_sym_create(ctx.algo, DCRYPT_MODE_ENCRYPT, &dctx, error_r))
186 ret = var_expand_crypt(dctx, ctx.enckey, ctx.iv, field_value, tmp, error_r);
187 dcrypt_ctx_sym_destroy(&dctx);
291 struct dcrypt_context_symmetric *dctx;
292 if (!dcrypt_ctx_sym_create(ctx.algo, DCRYPT_MODE_DECRYPT, &dctx, error_r))
294 ret = var_expand_crypt(dctx, ctx.enckey, ctx.iv, field_value, tmp, error_r);
295 dcrypt_ctx_sym_destroy(&dctx);