/test/xts/acts/security_lite/huks/common/ |
H A D | hks_test_common.c | 41 int32_t TestConstuctBlob(struct HksBlob **blob, bool blobExist, uint32_t blobSize, bool blobDataExist, in TestConstuctBlob() argument 44 if (!blobExist) { // blob not exist in TestConstuctBlob() 48 *blob = (struct HksBlob *)HksTestMalloc(sizeof(struct HksBlob)); in TestConstuctBlob() 49 if (*blob == NULL) { in TestConstuctBlob() 52 (void)memset_s(*blob, sizeof(struct HksBlob), 0, sizeof(struct HksBlob)); in TestConstuctBlob() 55 (*blob)->size = realBlobDataSize; in TestConstuctBlob() 56 (*blob)->data = (uint8_t *)HksTestMalloc(realBlobDataSize); in TestConstuctBlob() 57 if ((*blob)->data == NULL) { in TestConstuctBlob() 60 (void)memset_s((*blob)->data, realBlobDataSize, 0, realBlobDataSize); in TestConstuctBlob() 71 HKS_TEST_ASSERT(memcpy_s((*blob) in TestConstuctBlob() 605 TestConstructBlobOut(struct HksBlob **blob, bool blobExist, uint32_t blobSize, bool blobDataExist, uint32_t realBlobDataSize) TestConstructBlobOut() argument [all...] |
H A D | hks_test_aes.c | 95 aadParam.blob.data = g_aad; in ConstructParamSetEncryptDecryptAesPost() 96 aadParam.blob.size = sizeof(g_aad); in ConstructParamSetEncryptDecryptAesPost() 106 ivParam.blob.data = g_iv; in ConstructParamSetEncryptDecryptAesPost() 107 ivParam.blob.size = sizeof(g_iv); in ConstructParamSetEncryptDecryptAesPost() 116 nonceParam.blob.data = g_nonce; in ConstructParamSetEncryptDecryptAesPost() 117 nonceParam.blob.size = sizeof(g_nonce); in ConstructParamSetEncryptDecryptAesPost() 166 .blob = authId }, in GenerateBaseKey() 203 .blob = *baseKey }, in PlainPubKey() 205 .blob = *peerPubKey }, in PlainPubKey() 232 .blob in SetKeyAliasTrue() [all...] |
/test/xts/acts/security/asset/asset_ndk/entry/src/main/cpp/ |
H A D | hello.cpp | 48 {.tag = ASSET_TAG_SECRET, .value.blob = secret}, in Asset_Add() 49 {.tag = ASSET_TAG_ALIAS, .value.blob = alias}, in Asset_Add() 81 {.tag = ASSET_TAG_SECRET, .value.blob = secret}, in Asset_AddCE() 82 {.tag = ASSET_TAG_ALIAS, .value.blob = alias}, in Asset_AddCE() 88 {.tag = ASSET_TAG_ALIAS, .value.blob = alias}, in Asset_AddCE() 96 if (memcmp(secret->value.blob.data, reinterpret_cast<uint8_t *>(secretBuffer), secret->value.blob.size) == 0) { in Asset_AddCE() 135 {.tag = ASSET_TAG_SECRET, .value.blob = secret}, in Asset_Add_Auth() 136 {.tag = ASSET_TAG_ALIAS, .value.blob = alias}, in Asset_Add_Auth() 137 {.tag = ASSET_TAG_DATA_LABEL_NORMAL_1, .value.blob in Asset_Add_Auth() [all...] |
/test/xts/acts/security/huks/huks_napi_BasicTest/include/ |
H A D | huks_mem.h | 33 #define HUKS_FREE_BLOB(blob) \ 35 if ((blob).data != nullptr) { \ 36 HksFree((blob).data); \ 37 (blob).data = nullptr; \ 39 (blob).size = 0; \
|
H A D | huks_agree_dh_test.h | 59 {.tag = OH_HUKS_TAG_KEY_ALIAS, .blob = g_keyAliasFinal1001}, 75 {.tag = OH_HUKS_TAG_KEY_ALIAS, .blob = g_keyAliasFinal2001},
|
H A D | huks_three_stage_test_common.h | 59 OH_Huks_Result MallocAndCheckBlobData(struct OH_Huks_Blob *blob, const uint32_t blobSize);
|
/test/xts/acts/security/huks/huks_napi_BasicTest/src/ |
H A D | huks_attest_test_common.cpp | 166 ret |= strcmp(SEC_INFO_DATA, (char *)paramSet->params[g_index0].blob.data); in ValidataAndCompareCertInfo() 167 ret |= strcmp(CHALLENGE_DATA, (char *)paramSet->params[g_index1].blob.data); in ValidataAndCompareCertInfo() 168 ret |= strcmp(VERSION_DATA, (char *)paramSet->params[g_index2].blob.data); in ValidataAndCompareCertInfo() 169 ret |= strcmp(ALIAS, (char *)paramSet->params[g_index3].blob.data); in ValidataAndCompareCertInfo() 173 ret |= strcmp(UDID_DATA, (char *)paramSet->params[g_index4].blob.data); in ValidataAndCompareCertInfo() 174 ret |= strcmp(SN_DATA, (char *)paramSet->params[g_index5].blob.data); in ValidataAndCompareCertInfo() 175 ret |= strcmp(DEVICE_ID, (char *)paramSet->params[g_index6].blob.data); in ValidataAndCompareCertInfo()
|
H A D | huks_attest_test.cpp | 53 {.tag = OH_HUKS_TAG_ATTESTATION_ID_SEC_LEVEL_INFO, .blob = g_secInfo}, 54 {.tag = OH_HUKS_TAG_ATTESTATION_CHALLENGE, .blob = g_challenge}, 55 {.tag = OH_HUKS_TAG_ATTESTATION_ID_VERSION_INFO, .blob = g_version}, 56 {.tag = OH_HUKS_TAG_ATTESTATION_ID_ALIAS, .blob = g_keyAlias},
|
H A D | huks_derive_pbkdf_test.cpp | 54 {.tag = OH_HUKS_TAG_SALT, .blob = {sizeof(g_saltgen), (uint8_t *)g_saltgen}}, 62 {.tag = OH_HUKS_TAG_SALT, .blob = {sizeof(g_saltgen), (uint8_t *)g_saltgen}}, 68 .blob = {strlen("HksPBKDF2DeriveKeyAliasTest001_2"), (uint8_t *)"HksPBKDF2DeriveKeyAliasTest001_2"}},
|
H A D | huks_cipher_aes_test.cpp | 58 {.tag = OH_HUKS_TAG_IV, .blob = {.size = IV_SIZE, .data = (uint8_t *)IV}}, 67 {.tag = OH_HUKS_TAG_IV, .blob = {.size = IV_SIZE, .data = (uint8_t *)IV}}, 84 {.tag = OH_HUKS_TAG_IV, .blob = {.size = IV_SIZE, .data = (uint8_t *)IV}}, 93 {.tag = OH_HUKS_TAG_IV, .blob = {.size = IV_SIZE, .data = (uint8_t *)IV}},
|
H A D | huks_warpped_test.cpp | 85 .blob = {.size = Unittest::ImportWrapped::AAD_SIZE, .data = (uint8_t *)Unittest::ImportWrapped::AAD}}, 87 .blob = {.size = Unittest::ImportWrapped::NONCE_SIZE, .data = (uint8_t *)Unittest::ImportWrapped::NONCE}}, 117 .blob = {.size = Unittest::ImportWrapped::IV_SIZE, .data = (uint8_t *)Unittest::ImportWrapped::IV}},
|
H A D | huks_cipher_sm4_test.cpp | 64 {.tag = OH_HUKS_TAG_IV, .blob = {.size = HKS_SM4_IV_SIZE, .data = (uint8_t *)g_hksSm4TestIv}}, 73 {.tag = OH_HUKS_TAG_IV, .blob = {.size = HKS_SM4_IV_SIZE, .data = (uint8_t *)g_hksSm4TestIv}},
|
H A D | huks_misc_test.cpp | 219 struct OH_Huks_Blob blob; in HWTEST_F() local 220 ASSERT_EQ(sizeof(blob.size) == sizeof(uint32_t), true); in HWTEST_F() 221 ASSERT_EQ(sizeof(blob.data) == sizeof(uint8_t *), true); in HWTEST_F() 229 ASSERT_EQ(sizeof(param.blob) == sizeof(struct OH_Huks_Blob), true); in HWTEST_F()
|
H A D | huks_agree_ecdh_test.cpp | 73 {.tag = OH_HUKS_TAG_KEY_ALIAS, .blob = g_keyAliasFinal1001}, 89 {.tag = OH_HUKS_TAG_KEY_ALIAS, .blob = g_keyAliasFinal2001},
|
H A D | huks_wrapped_test_common.cpp | 33 .blob = {.size = Unittest::ImportWrapped::AAD_SIZE, .data = (uint8_t *)Unittest::ImportWrapped::AAD}},
35 .blob = {.size = Unittest::ImportWrapped::NONCE_SIZE, .data = (uint8_t *)Unittest::ImportWrapped::NONCE}},
46 .blob = {.size = Unittest::ImportWrapped::IV_SIZE, .data = (uint8_t *)Unittest::ImportWrapped::IV}},
|
H A D | huks_agree_x25519_test.cpp | 69 {.tag = OH_HUKS_TAG_KEY_ALIAS, .blob = g_keyAliasFinal1001}, 85 {.tag = OH_HUKS_TAG_KEY_ALIAS, .blob = g_keyAliasFinal2001},
|
H A D | huks_three_stage_test_common.cpp | 246 OH_Huks_Result MallocAndCheckBlobData(struct OH_Huks_Blob *blob, const uint32_t blobSize) in MallocAndCheckBlobData() argument 251 blob->data = (uint8_t *)HksMalloc(blobSize); in MallocAndCheckBlobData() 252 if (blob->data == NULL) { in MallocAndCheckBlobData()
|
H A D | huks_derive_hkdf_test.cpp | 59 .blob = {strlen("HksHKDFDeriveKeyAliasFinalTest001"), (uint8_t *)"HksHKDFDeriveKeyAliasFinalTest001"}},
|
H A D | huks_cipher_aes_test_common.cpp | 134 (void)memcpy_s(decryptParamSet->params[i].blob.data, AEAD_SIZE, tempPtr + cipherText.size, AEAD_SIZE); in HksAesCipherTestCaseGcm2()
|
/test/xts/acts/security/huks/huks_ndk_Test/entry/src/main/cpp/ |
H A D | utils.cpp | 91 {.tag = OH_HUKS_TAG_ASSOCIATED_DATA, .blob = {.size = AAD_SIZE, .data = (uint8_t*)AAD}},
92 {.tag = OH_HUKS_TAG_NONCE, .blob = {.size = NONCE_SIZE, .data = (uint8_t*)NONCE}},
112 {.tag = OH_HUKS_TAG_IV, .blob = {.size = WRAPPED_KEY_IV_SIZE, .data = (uint8_t*)WRAPPED_KEY_IV}},
126 {.tag = OH_HUKS_TAG_ASSOCIATED_DATA, .blob = {.size = AAD_SIZE, .data = (uint8_t*)AAD}},
127 {.tag = OH_HUKS_TAG_NONCE, .blob = {.size = NONCE_SIZE, .data = (uint8_t*)NONCE}},
136 {.tag = OH_HUKS_TAG_IV, .blob = {.size = IV_SIZE, .data = (uint8_t*)IV}},
163 OH_Huks_Result MallocAndCheckBlobData(struct OH_Huks_Blob* blob, const uint32_t blobSize)
in MallocAndCheckBlobData() argument 168 blob->data = (uint8_t*)malloc(blobSize);
in MallocAndCheckBlobData() 170 if (blob->data == NULL) {
in MallocAndCheckBlobData() 178 #define HUKS_FREE_BLOB(blob) \
[all...] |
H A D | huksndk.cpp | 465 {.tag = OH_HUKS_TAG_ATTESTATION_ID_SEC_LEVEL_INFO, .blob = g_secInfo},
466 {.tag = OH_HUKS_TAG_ATTESTATION_CHALLENGE, .blob = g_challenge},
467 {.tag = OH_HUKS_TAG_ATTESTATION_ID_VERSION_INFO, .blob = g_version},
468 {.tag = OH_HUKS_TAG_ATTESTATION_ID_ALIAS, .blob = g_keyAlias},
964 {.tag = OH_HUKS_TAG_SALT, .blob = {sizeof(g_saltgen), (uint8_t*)g_saltgen}},
973 {.tag = OH_HUKS_TAG_SALT, .blob = {sizeof(g_saltgen), (uint8_t*)g_saltgen}},
980 .blob = {sizeof("HksPBKDF2DeriveKeyAliasTest001_2"), (uint8_t*)"HksPBKDF2DeriveKeyAliasTest001_2"}},
1185 {.tag = OH_HUKS_TAG_ATTESTATION_CHALLENGE, .blob = g_challenge},
in OHHuksAnonAttestKeyItem() 1186 {.tag = OH_HUKS_TAG_ATTESTATION_ID_ALIAS, .blob = gkeyAlias},
in OHHuksAnonAttestKeyItem()
|
/test/xts/acts/commonlibrary/ets_utils/threadWorker_lib_standard/entry/src/ohosTest/ets/workers/ |
H A D | newworker_038.js | 22 let blob = new buffer.Blob(['a', 'b', 'c']); 23 let pro = blob.arrayBuffer();
|
/test/xts/acts/security_lite/huks/common/include/ |
H A D | hks_test_common.h | 50 /* inputparams: struct HksBlob *blob */ 52 bool blobExist; /* blob null or not */ 53 uint32_t blobSize; /* blob->size value */ 54 bool blobDataExist; /* blob->data null or not */ 55 uint32_t blobDataSize; /* blob->data malloc size */ 385 int32_t TestConstuctBlob(struct HksBlob **blob, 421 int32_t TestConstructBlobOut(struct HksBlob **blob,
|
/test/xts/device_attest/services/core/security/ |
H A D | attest_security.c | 74 .blob = { 101 .blob = {
|