Lines Matching defs:encrypt

87 	session_p->encrypt.flags = CRYPTO_OPERATION_ACTIVE;
118 session_p->encrypt.mech = *pMechanism;
121 if (INPLACE_MECHANISM(session_p->encrypt.mech.mechanism)) {
122 session_p->encrypt.flags |= CRYPTO_OPERATION_INPLACE_OK;
155 session_p->encrypt.flags &= ~CRYPTO_OPERATION_ACTIVE;
175 crypto_encrypt_t encrypt;
206 if (!(session_p->encrypt.flags & CRYPTO_OPERATION_ACTIVE)) {
215 if (session_p->encrypt.flags & CRYPTO_OPERATION_UPDATE) {
218 * operation, so we'll leave the active encrypt operation
220 * encrypt update operation.
226 encrypt.ce_session = session_p->k_session;
235 inplace = (session_p->encrypt.flags & CRYPTO_OPERATION_INPLACE_OK) != 0;
237 encrypt.ce_encrlen = ulDataLen;
239 encrypt.ce_encrlen = *pulEncryptedDataLen;
244 encrypt.ce_datalen = ulDataLen;
245 encrypt.ce_databuf = (char *)pData;
246 encrypt.ce_encrbuf = (char *)pEncryptedData;
247 encrypt.ce_flags =
250 (encrypt.ce_encrlen == encrypt.ce_datalen) ?
253 while ((r = ioctl(kernel_fd, CRYPTO_ENCRYPT, &encrypt)) < 0) {
260 rv = crypto2pkcs11_error_number(encrypt.ce_return_value);
264 *pulEncryptedDataLen = encrypt.ce_encrlen;
269 * We will not terminate the active encrypt operation flag,
280 * Terminates the active encrypt operation.
282 * encrypt operation.
285 session_p->encrypt.flags = 0;
337 if (!(session_p->encrypt.flags & CRYPTO_OPERATION_ACTIVE)) {
342 session_p->encrypt.flags |= CRYPTO_OPERATION_UPDATE;
353 inplace = (session_p->encrypt.flags & CRYPTO_OPERATION_INPLACE_OK) != 0;
384 * After an error occurred, terminate the current encrypt
388 session_p->encrypt.flags = 0;
427 if (!(session_p->encrypt.flags & CRYPTO_OPERATION_ACTIVE)) {
456 * We will not terminate the active encrypt operation flag,
466 /* Terminates the active encrypt operation. */
468 session_p->encrypt.flags = 0;