RSA Security Projection Television 5.2.2 Manual de usuario Pagina 184

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 376
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 183
Hash-Based Message Authentication Code (HMAC)
162 RSA BSAFE Crypto-C Developers Guide
Step 3: Init
For hash-based message authentication, you need a key before you can initialize the
object.
Step 3a: Creating the Key Object
Create the key object:
Step 3b: Setting the Key Object
Generate a random 24-byte key using KI_24Byte:
B_DIGEST_SPECIFIER hmacInfo;
hmacInfo.digestInfoType = AI_SHA1;
hmacInfo.digestInfoParams = NULL_PTR;
if ((status = B_SetAlgorithmInfo
(HMACDigester, AI_HMAC, (POINTER)&hmacInfo)) != 0)
break;
#define KEY_SIZE 24
B_KEY_OBJ HMACKey = (B_KEY_OBJ)NULL_PTR;
unsigned char *keyData;
/* Create a key object */
if ((status = B_CreateKeyObject (&HMACKey)) != 0)
break;
ITEM keyDataItem = {NULL,0};
keyData = T_malloc (KEY_SIZE);
if ((status = (keyData == NULL_PTR)) != 0)
break;
Vista de pagina 183
1 2 ... 179 180 181 182 183 184 185 186 187 188 189 ... 375 376

Comentarios a estos manuales

Sin comentarios