/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _KERNEL
#include <stdlib.h>
#endif
/*
* Initialize by setting iov_or_mp to point to the current iovec or mp,
* and by setting current_offset to an offset within the current iovec or mp.
*/
void
{
case CRYPTO_DATA_RAW:
break;
case CRYPTO_DATA_UIO: {
;
*current_offset = offset;
break;
}
case CRYPTO_DATA_MBLK: {
;
*current_offset = offset;
break;
}
} /* end switch */
}
/*
* Get pointers for where in the output to copy a block of encrypted or
* decrypted data. The iov_or_mp argument stores a pointer to the current
* iovec or mp, and offset stores an offset into the current iovec or mp.
*/
void
{
case CRYPTO_DATA_RAW: {
offset = *current_offset;
/* one block fits */
*out_data_1_len = amt;
*out_data_2 = NULL;
}
break;
}
case CRYPTO_DATA_UIO: {
uint8_t *p;
offset = *current_offset;
*out_data_1 = p;
/* can fit one block into this iov */
*out_data_1_len = amt;
*out_data_2 = NULL;
} else {
/* one block spans two iovecs */
return;
vec_idx++;
}
break;
}
case CRYPTO_DATA_MBLK: {
uint8_t *p;
offset = *current_offset;
*out_data_1 = p;
/* can fit one block into this mblk */
*out_data_1_len = amt;
*out_data_2 = NULL;
} else {
/* one block spans two mblks */
return;
}
break;
}
} /* end switch */
}
void
{
switch (common_ctx->cc_flags &
case ECB_MODE:
#ifdef _KERNEL
#else
#endif
break;
case CBC_MODE:
#ifdef _KERNEL
#else
#endif
break;
case CTR_MODE:
#ifdef _KERNEL
#else
#endif
break;
case CCM_MODE:
#ifdef _KERNEL
#else
#endif
break;
case GCM_MODE:
case GMAC_MODE:
#ifdef _KERNEL
#else
#endif
}
}