Searched refs:digestLen (Results 1 – 20 of 20) sorted by relevance
39 uint32_t digestLen; member81 uint32_t digestLen; in HmacCheckParam() local82 HKS_IF_NOT_SUCC_LOGE_RETURN(HksGetDigestLen(alg, &digestLen), in HmacCheckParam()85 if (mac->size < digestLen) { in HmacCheckParam()86 …E("invalid mac->size(0x%" LOG_PUBLIC "x) for digestLen(0x%" LOG_PUBLIC "x)", mac->size, digestLen); in HmacCheckParam()131 uint32_t digestLen; in HksOpensslHmacInit()132 HKS_IF_NOT_SUCC_LOGE_RETURN(HksGetDigestLen(digestAlg, &digestLen), in HksOpensslHmacInit()154 outCtx->digestLen = digestLen; in HksOpensslHmacInit()
388 uint32_t digestLen = ED25519_FIX_KEY_BUFFER_SIZE; in ConvertPrivX25519FromED25519() local390 if (EVP_Digest(input, inputLen, digest, &digestLen, EVP_sha512(), NULL) <= 0) { in ConvertPrivX25519FromED25519()396 digestLen / 2) != EOK) { // 2 : used to calculate half of the digest length in ConvertPrivX25519FromED25519()397 (void)memset_s(digest, digestLen, 0, digestLen); in ConvertPrivX25519FromED25519()407 (void)memset_s(digest, digestLen, 0, digestLen); in ConvertPrivX25519FromED25519()
102 int32_t HksGetDigestLen(uint32_t digest, uint32_t *digestLen) in HksGetDigestLen() argument106 *digestLen = HKS_DIGEST_MD5_LEN; in HksGetDigestLen()109 *digestLen = HKS_DIGEST_SHA1_LEN; in HksGetDigestLen()112 *digestLen = HKS_DIGEST_SHA224_LEN; in HksGetDigestLen()115 *digestLen = HKS_DIGEST_SHA256_LEN; in HksGetDigestLen()118 *digestLen = HKS_DIGEST_SHA384_LEN; in HksGetDigestLen()121 *digestLen = HKS_DIGEST_SHA512_LEN; in HksGetDigestLen()124 *digestLen = HKS_DIGEST_SM3_LEN; in HksGetDigestLen()
1032 uint32_t digestLen; in CheckMacOutput()1033 ret = HksGetDigestLen(digest, &digestLen); in CheckMacOutput()1036 if (mac->size < digestLen) { in CheckMacOutput()1041 …if ((isLocalCheck) && (key->size < digestLen)) { /* the unit of local engine input key size is byt… in CheckMacOutput()
1189 uint32_t digestLen; in CheckRsaOaepCipherData() local1193 int32_t ret = HksGetDigestLen(digest, &digestLen); in CheckRsaOaepCipherData()1200 if (keySize <= (HKS_RSA_OAEP_DIGEST_NUM * digestLen + HKS_RSA_OAEP_DIGEST_NUM)) { in CheckRsaOaepCipherData()1203 uint32_t size = keySize - HKS_RSA_OAEP_DIGEST_NUM * digestLen - HKS_RSA_OAEP_DIGEST_NUM; in CheckRsaOaepCipherData()1207 "digestLen: %" LOG_PUBLIC "u", inData->size, keySize, digestLen); in CheckRsaOaepCipherData()
130 size_t digestLen = hash.size(); in HashCheck() local131 if (digestLen != PKG_HASH_CONTENT_LEN) { in HashCheck()136 std::vector<uint8_t> sourceDigest(digestLen); in HashCheck()144 if (memcmp(hash.data(), sourceDigest.data(), digestLen) != EOK) { in HashCheck()
249 size_t digestLen = static_cast<size_t>(ReadLE16(digestBlock.data() + offset)); in GetDigestFromContentInfo() local251 if ((GetDigestLength(algoId) != digestLen) || ((digestLen + offset) != digestBlock.size())) { in GetDigestFromContentInfo()252 PKG_LOGE("invalid digestLen[%zu] and digestBlock len[%zu]", digestLen, digestBlock.size()); in GetDigestFromContentInfo()
22 uint32_t digestLen; member
101 uint32_t digestLen = sizeof(struct fsverity_formatted_digest) + digest->digest_size; in GenerateFormattedDigest() local102 if (!digestBuffer.Resize(digestLen)) { in GenerateFormattedDigest()
276 uint32_t digestLen; in VerifyShaWithRsaPss() local277 if (EVP_DigestFinal_ex(mdCtxTmp, digest, &digestLen) <= 0) { in VerifyShaWithRsaPss()285 if (!VerifyShaWithRsaPss(signInfo, pkey, isPss, digest, digestLen)) { in VerifyShaWithRsaPss()316 uint32_t digestLen; in VerifyPkcs7AuthAttributes() local317 if (EVP_DigestFinal_ex(mdCtx, digest, &digestLen) <= 0) { in VerifyPkcs7AuthAttributes()323 if (!AsnStringCmp(digestInAttribute, digest, static_cast<int>(digestLen))) { in VerifyPkcs7AuthAttributes()381 const unsigned char digest[], uint32_t digestLen) in VerifyShaWithRsaPss() argument408 …erify(pkeyCtx, signInfo->enc_digest->data, signInfo->enc_digest->length, digest, digestLen) <= 0) { in VerifyShaWithRsaPss()
461 …int32_t digestLen = HapVerifyOpensslUtils::GetDigest(chunkDigest, optionalBlocks, digestParam, out… in ComputeDigestsWithOptionalBlock() local462 if (digestLen != digestParam.digestOutputSizeBytes) { in ComputeDigestsWithOptionalBlock()464 digestLen, digestParam.digestOutputSizeBytes); in ComputeDigestsWithOptionalBlock()530 int32_t digestLen = HapVerifyOpensslUtils::GetDigest(digestParam, out); in ComputeDigestsForEachChunk() local531 if (digestLen != digestParam.digestOutputSizeBytes) { in ComputeDigestsForEachChunk()533 digestLen, digestParam.digestOutputSizeBytes); in ComputeDigestsForEachChunk()537 offset += digestLen; in ComputeDigestsForEachChunk()
1/* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * ...
104 hmacCtx->digestLen = HKS_ALG_AES;
57 int32_t HksGetDigestLen(uint32_t digest, uint32_t *digestLen);
104 constexpr size_t digestLen = 32; in TestInvalidParam() local114 uint8_t dig2[digestLen]; in TestInvalidParam()
53 constexpr uint32_t digestLen = 32; in TestInvalidCreatePackage() local54 ret = VerifyPackage(nullptr, GetTestCertName(0).c_str(), nullptr, nullptr, digestLen); in TestInvalidCreatePackage()
767 size_t digestLen = DigestAlgorithm::GetDigestLen(digestMethod); in DoCreatePkgStream() local791 PkgBuffer result(digestInfos[DIGEST_INFO_HAS_SIGN].data(), digestLen); in DoCreatePkgStream()795 PkgBuffer result(digestInfos[DIGEST_INFO_NO_SIGN].data(), digestLen); in DoCreatePkgStream()834 size_t digestLen = DigestAlgorithm::GetDigestLen(info->digestMethod); in DoCreatePkgStream() local836 digestInfos[DIGEST_INFO_HAS_SIGN].resize(digestLen); in DoCreatePkgStream()855 PkgBuffer digest(digestInfos[DIGEST_INFO_HAS_SIGN].data(), digestLen); in DoCreatePkgStream()998 size_t digestLen = DigestAlgorithm::GetDigestLen(digestMethod); in DoCreatePkgStream() local1000 if (digestLen != digest.length) { in DoCreatePkgStream()1006 digestInfos[DIGEST_INFO_HAS_SIGN].resize(digestLen); in DoCreatePkgStream()1007 digestInfos[DIGEST_INFO_NO_SIGN].resize(digestLen); in DoCreatePkgStream()
75 const unsigned char digest[], uint32_t digestLen);
52 uint32_t digestLen; in HksLocalHash()53 ret = HksGetDigestLen(digestAlg->uint32Param, &digestLen); in HksLocalHash()56 if (hash->size < digestLen) { in HksLocalHash()
72 uint32_t digestLen; in CheckRsaCipherData() local73 int32_t ret = HksGetDigestLen(digest, &digestLen); in CheckRsaCipherData()76 if (keySize <= (HKS_RSA_OAEP_DIGEST_NUM * digestLen + HKS_RSA_OAEP_DIGEST_NUM)) { in CheckRsaCipherData()80 uint32_t size = keySize - HKS_RSA_OAEP_DIGEST_NUM * digestLen - HKS_RSA_OAEP_DIGEST_NUM; in CheckRsaCipherData()