/* Initiliaze Arc4 for use with Nitrox device */ int Arc4InitCavium(Arc4* arc4, int devId) { if (arc4 == NULL) return -1; if (CspAllocContext(CONTEXT_SSL, &arc4->contextHandle, devId) != 0) return -1; arc4->devId = devId; arc4->magic = CYASSL_ARC4_CAVIUM_MAGIC; return 0; }
/* Initiliaze Des3 for use with Nitrox device */ int Des3_InitCavium(Des3* des3, int devId) { if (des3 == NULL) return -1; if (CspAllocContext(CONTEXT_SSL, &des3->contextHandle, devId) != 0) return -1; des3->devId = devId; des3->magic = CYASSL_3DES_CAVIUM_MAGIC; return 0; }
/* Initiliaze RSA for use with Nitrox device */ int RsaInitCavium(RsaKey* rsa, int devId) { if (rsa == NULL) return -1; if (CspAllocContext(CONTEXT_SSL, &rsa->contextHandle, devId) != 0) return -1; rsa->devId = devId; rsa->magic = CYASSL_RSA_CAVIUM_MAGIC; return 0; }
/* Initiliaze Hmac for use with Nitrox device */ int wc_HmacInitCavium(Hmac* hmac, int devId) { if (hmac == NULL) return -1; if (CspAllocContext(CONTEXT_SSL, &hmac->contextHandle, devId) != 0) return -1; hmac->keyLen = 0; hmac->dataLen = 0; hmac->type = 0; hmac->devId = devId; hmac->magic = WOLFSSL_HMAC_CAVIUM_MAGIC; hmac->data = NULL; /* buffered input data */ hmac->innerHashKeyed = 0; return 0; }