RSA Security Projection Television 5.2.2 Manual do Utilizador Página 211

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 376
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 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 página 210
1 2 ... 206 207 208 209 210 211 212 213 214 215 216 ... 375 376

Comentários a estes Manuais

Sem comentários