Home
last modified time | relevance | path

Searched refs:actualRead (Results 1 – 4 of 4) sorted by relevance

/trusted-firmware-m-3.7.0/lib/ext/cryptocell-312-runtime/utils/src/common/
Dcommon_util_files.c28 size_t actualRead=0; in CC_CommonUtilCopyDataFromRawTextFile() local
68 actualRead = fread(outBuff, 1, maxBytesToRead, fd); in CC_CommonUtilCopyDataFromRawTextFile()
70 while ((outBuff[actualRead-1] == ' ') || in CC_CommonUtilCopyDataFromRawTextFile()
71 (outBuff[actualRead-1] == '\n') || in CC_CommonUtilCopyDataFromRawTextFile()
72 (outBuff[actualRead-1] == '\0') || in CC_CommonUtilCopyDataFromRawTextFile()
73 (outBuff[actualRead-1] == 0x0A) || in CC_CommonUtilCopyDataFromRawTextFile()
74 (outBuff[actualRead-1] == 0x0D)) { in CC_CommonUtilCopyDataFromRawTextFile()
75 actualRead--; in CC_CommonUtilCopyDataFromRawTextFile()
77 *outBuffLen = actualRead; in CC_CommonUtilCopyDataFromRawTextFile()
105 size_t actualRead=0; in CC_CommonUtilCopyDataFromTextFile() local
[all …]
Dcommon_crypto_encode.c120 int32_t actualRead = 0; in CC_CommonBase64Decode() local
173 actualRead = BIO_read(bio, pDecBuff, encBuffLen); in CC_CommonBase64Decode()
174 if (actualRead != expDecBuffLen) { in CC_CommonBase64Decode()
175 … UTIL_LOG_ERR("failed to BIO_read expDecBuffLen %d = actualRead %d\n", expDecBuffLen, actualRead); in CC_CommonBase64Decode()
179 *pDecBuffLen = actualRead; in CC_CommonBase64Decode()
/trusted-firmware-m-3.7.0/lib/ext/cryptocell-312-runtime/utils/src/cc3x_boot_cert/cert_lib/
Dmain.c119 uint32_t actualRead = 0; in SBU_AES_CTR_EncryptFile() local
201 actualRead = fread(origBuff, 1, MAX_IMAGE_CHUNK, fd); in SBU_AES_CTR_EncryptFile()
202 if (actualRead == 0) in SBU_AES_CTR_EncryptFile()
207 totalRead += actualRead; in SBU_AES_CTR_EncryptFile()
213 rc = EVP_EncryptUpdate(&ctrCtx, encryptedBuff, &prevBuffLen, origBuff, actualRead); in SBU_AES_CTR_EncryptFile()
232 actualWriten = fwrite(pBuff2Hash, 1, actualRead, encFd); in SBU_AES_CTR_EncryptFile()
233 if (actualWriten != actualRead) { in SBU_AES_CTR_EncryptFile()
234 …printf( "failed to write data to file actual written %d, expected %d\n", actualWriten, actualRead); in SBU_AES_CTR_EncryptFile()
242 rc = SHA256_Update(&sha256Ctx, origBuff, actualRead); in SBU_AES_CTR_EncryptFile()
244 rc = SHA256_Update(&sha256Ctx, encryptedBuff, actualRead); in SBU_AES_CTR_EncryptFile()
/trusted-firmware-m-3.7.0/lib/ext/cryptocell-312-runtime/utils/src/cc3x_boot_cert/x509cert_lib/
Dmain.c282 uint32_t actualRead = 0; in SBU_AES_CTR_EncryptFile() local
364 actualRead = fread(origBuff, 1, MAX_IMAGE_CHUNK, fd); in SBU_AES_CTR_EncryptFile()
365 if (actualRead == 0) in SBU_AES_CTR_EncryptFile()
370 totalRead += actualRead; in SBU_AES_CTR_EncryptFile()
377 rc = EVP_EncryptUpdate(&ctrCtx, encryptedBuff, &prevBuffLen, origBuff, actualRead); in SBU_AES_CTR_EncryptFile()
396 actualWriten = fwrite(pBuff2Hash, 1, actualRead, encFd); in SBU_AES_CTR_EncryptFile()
397 if (actualWriten != actualRead) { in SBU_AES_CTR_EncryptFile()
398 …printf( "failed to write data to file actual written %d, expected %d\n", actualWriten, actualRead); in SBU_AES_CTR_EncryptFile()
406 rc = SHA256_Update(&sha256Ctx, origBuff, actualRead); in SBU_AES_CTR_EncryptFile()
408 rc = SHA256_Update(&sha256Ctx, encryptedBuff, actualRead); in SBU_AES_CTR_EncryptFile()