RSA Security Projection Television 5.2.2 Manual de usuario Pagina 211

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 376
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 210
Chapter 6 Symmetric-Key Operations 189
Block Ciphers
Step 5: Final
Step 6: Destroy
Remember to destroy all objects created and free up any memory allocated:
if ((status = (encryptedData == NULL_PTR)) != 0)
break;
if ((status = B_EncryptUpdate
(rc2Encrypter, encryptedData, &outputLenUpdate,
encryptedDataLen, dataToEncrypt, dataToEncryptLen,
(B_ALGORITHM_OBJ)NULL_PTR,
(A_SURRENDER_CTX *)NULL_PTR)) != 0)
break;
unsigned int outputLenFinal;
if ((status = B_EncryptFinal
(rc2Encrypter, encryptedData + outputLenUpdate,
&outputLenFinal, encryptedDataLen - outputLenUpdate,
(B_ALGORITHM_OBJ)NULL_PTR,
(A_SURRENDER_CTX *)NULL_PTR)) != 0)
break;
B_DestroyKeyObject (&rc2Key);
B_DestroyAlgorithmObject (&rc2Encrypter);
B_DestroyAlgorithmObject (&randomAlgorithm);
if (encryptedData != NULL_PTR) {
T_memset (encryptedData, 0, encryptedDataLen);
T_free (encryptedData);
encryptedData = NULL_PTR;
}
if (rc2KeyItem.data != NULL_PTR) {
T_memset (rc2KeyItem.data, 0, rc2KeyItem.len);
T_free (rc2KeyItem.data);
rc2KeyItem.data = NULL_PTR;
rc2KeyItem.len = 0;
}
Vista de pagina 210
1 2 ... 206 207 208 209 210 211 212 213 214 215 216 ... 375 376

Comentarios a estos manuales

Sin comentarios