Lines Matching defs:block

130  * @param ctx The block context to use.
147 apr_crypto_block_t *block = (apr_crypto_block_t *) data;
148 return crypto_block_cleanup(block);
461 * @param ctx The block context returned, see note.
467 * @param blockSize The block size of the cipher.
479 apr_crypto_block_t *block = *ctx;
480 if (!block) {
481 *ctx = block = apr_pcalloc(p, sizeof(apr_crypto_block_t));
483 if (!block) {
486 block->f = key->f;
487 block->pool = p;
488 block->provider = key->provider;
490 apr_pool_cleanup_register(p, block, crypto_block_cleanup_helper,
494 EVP_CIPHER_CTX_init(&block->cipherCtx);
495 block->initialised = 1;
522 if (!EVP_EncryptInit_ex(&block->cipherCtx, key->cipher, config->engine,
525 if (!EVP_EncryptInit_ex(&block->cipherCtx, key->cipher, config->engine, (unsigned char *) key->key, (unsigned char *) usedIv)) {
531 if (!EVP_CIPHER_CTX_set_padding(&block->cipherCtx, key->doPad)) {
557 * @param ctx The block context to use.
599 * @brief Encrypt final data block, write it to out.
600 * @note If necessary the final block will be written out after being
601 * padded. Typically the final block will be written to the
610 * @param ctx The block context to use.
612 * @return APR_EPADDING if padding was enabled and the block was incorrectly
634 * @param ctx The block context returned, see note.
635 * @param blockSize The block size of the cipher.
650 apr_crypto_block_t *block = *ctx;
651 if (!block) {
652 *ctx = block = apr_pcalloc(p, sizeof(apr_crypto_block_t));
654 if (!block) {
657 block->f = key->f;
658 block->pool = p;
659 block->provider = key->provider;
661 apr_pool_cleanup_register(p, block, crypto_block_cleanup_helper,
665 EVP_CIPHER_CTX_init(&block->cipherCtx);
666 block->initialised = 1;
677 if (!EVP_DecryptInit_ex(&block->cipherCtx, key->cipher, config->engine,
680 if (!EVP_DecryptInit_ex(&block->cipherCtx, key->cipher, config->engine, (unsigned char *) key->key, (unsigned char *) iv)) {
686 if (!EVP_CIPHER_CTX_set_padding(&block->cipherCtx, key->doPad)) {
712 * @param ctx The block context to use.
754 * @brief Decrypt final data block, write it to out.
755 * @note If necessary the final block will be written out after being
756 * padded. Typically the final block will be written to the
765 * @param ctx The block context to use.
767 * @return APR_EPADDING if padding was enabled and the block was incorrectly