/system/security/identity/util/test/java/com/android/security/identity/internal/ |
D | UtilUnitTests.java | 65 new CborEncoder(baos).encode(new CborBuilder() in prettyPrintMultipleCompleteTypes() 83 new CborEncoder(baos).encode(new UnicodeString("foobar")); in prettyPrintString() 90 new CborEncoder(baos).encode(new ByteString(new byte[]{1, 2, 33, (byte) 254})); in prettyPrintBytestring() 97 new CborEncoder(baos).encode(new UnsignedInteger(42)); in prettyPrintUnsignedInteger() 104 new CborEncoder(baos).encode(new NegativeInteger(-42)); in prettyPrintNegativeInteger() 111 new CborEncoder(baos).encode(new DoublePrecisionFloat(1.1)); in prettyPrintDouble() 115 new CborEncoder(baos).encode(new DoublePrecisionFloat(-42.0000000001)); in prettyPrintDouble() 119 new CborEncoder(baos).encode(new DoublePrecisionFloat(-5)); in prettyPrintDouble() 139 new CborEncoder(baos).encode(new SinglePrecisionFloat(-5f)); in prettyPrintFloat() 146 new CborEncoder(baos).encode(new HalfPrecisionFloat(1.1f)); in prettyPrintHalfFloat() [all …]
|
/system/libcppbor/include/cppbor/ |
D | cppbor.h | 211 virtual uint8_t* encode(uint8_t* pos, const uint8_t* end) const = 0; 216 virtual void encode(EncodeCallback encodeCallback) const = 0; 228 void encode(OutputIterator i) const { in encode() function 229 return encode([&](uint8_t v) { *i++ = v; }); in encode() 235 std::vector<uint8_t> encode() const { in encode() function 238 encode(std::back_inserter(retval)); in encode() 248 encode([&](uint8_t v) { retval.push_back(v); }); in toString() 285 uint8_t* encode(uint8_t* pos, const uint8_t* end) const override { in encode() function 289 void encode(EncodeCallback encodeCallback) const override { in encode() function 331 using Item::encode; [all …]
|
/system/libcppbor/src/ |
D | cppbor.cpp | 381 uint8_t* Bstr::encode(uint8_t* pos, const uint8_t* end) const { in encode() function in cppbor::Bstr 393 uint8_t* ViewBstr::encode(uint8_t* pos, const uint8_t* end) const { in encode() function in cppbor::ViewBstr 405 uint8_t* Tstr::encode(uint8_t* pos, const uint8_t* end) const { in encode() function in cppbor::Tstr 417 uint8_t* ViewTstr::encode(uint8_t* pos, const uint8_t* end) const { in encode() function in cppbor::ViewTstr 437 uint8_t* Array::encode(uint8_t* pos, const uint8_t* end) const { in encode() function in cppbor::Array 441 pos = entry->encode(pos, end); in encode() 447 void Array::encode(EncodeCallback encodeCallback) const { in encode() function in cppbor::Array 450 entry->encode(encodeCallback); in encode() 471 uint8_t* Map::encode(uint8_t* pos, const uint8_t* end) const { in encode() function in cppbor::Map 475 pos = entry.first->encode(pos, end); in encode() [all …]
|
/system/keymint/tests/src/ |
D | lib.rs | 143 assert_eq!(hex::encode(got), test.want, "incorrect HKDF result for case {}", i); in test_hkdf() 322 hex::encode(&mac), in test_hmac() 350 assert_eq!(hex::encode(&cmac[..16]), want); in test_aes_cmac() 366 hex::encode(result), in test_ckdf() 420 assert_eq!(format!("{}{}", test.ct, test.tag), hex::encode(&got_ct)); in test_aes_gcm() 433 assert_eq!(test.msg, hex::encode(&got_pt)); in test_aes_gcm() 448 assert_eq!(test.msg, hex::encode(&got_pt)); in test_aes_gcm() 498 assert_eq!(test.ct, hex::encode(&got_ct)); in test_des() 505 assert_eq!(test.msg, hex::encode(&got_pt)); in test_des() 559 hex::encode(&subject_data), in test_signing_cert_parse() [all …]
|
/system/libcppbor/ |
D | README.md | 62 The set of `encode` methods in `Item` provide the interface for 66 and then call one of the `encode` methods, whichever is convenient for 71 std::vector<uint8_t> encoding = val.encode(); 83 std::vector<uint8_t> encoding = val.encode(); 107 std::vector<uint8_t> encoding = val.encode(); 116 #### `encode` methods 118 There are several variations of `Item::encode`, all of which 123 * `bool encode(uint8\_t** pos, const uint8\_t* end)` encodes into the 126 returns false. This is the most efficient way to encode, into an 128 * `void encode(EncodeCallback encodeCallback)` calls `encodeCallback` [all …]
|
/system/keymint/common/src/tag/ |
D | tests.rs | 43 assert_eq!(hex::encode(got_data), hex_data); in test_legacy_serialization() 47 assert!(data.is_empty(), "data left: {}", hex::encode(data)); in test_legacy_serialization() 123 assert_eq!(hex::encode(got), want, "mismatch for input IMEI {}", input); in test_increment_imei()
|
/system/security/identity/util/src/java/com/android/security/identity/internal/ |
D | Iso18013.java | 98 new CborEncoder(daBaos).encode(new CborBuilder() in buildDeviceAuthenticationCbor() 124 new CborEncoder(daBaos).encode(new CborBuilder() in buildReaderAuthenticationBytesCbor() 162 new CborEncoder(baos).encode(new CborBuilder() in buildSessionTranscript() 178 new CborEncoder(baos).encode(new CborBuilder() in buildSessionTranscript() 249 encoder.encode(builder.build()); in createItemsRequest()
|
D | Util.java | 103 encoder.encode(dataItem); in canonicalizeCbor() 296 encoder.encode(dataItems); in encodeCbor() 736 new CborEncoder(baos).encode(dataItem); in cborEncode() 942 new CborEncoder(daBaos).encode(new CborBuilder() in buildDeviceAuthenticationCbor() 968 new CborEncoder(daBaos).encode(new CborBuilder() in buildReaderAuthenticationBytesCbor() 993 new CborEncoder(baos).encode(buildCborTaggedByteString(encodedCbor)); in prependSemanticTagForEncodedCbor() 1200 new CborEncoder(baos).encode(new CborBuilder() in buildSessionTranscript() 1216 new CborEncoder(baos).encode(new CborBuilder() in buildSessionTranscript() 1286 encoder.encode(builder.build()); in createItemsRequest()
|
/system/libcppbor/tests/ |
D | cppbor_test.cpp | 458 EXPECT_EQ(buf.data() + buf.size(), map.encode(buf.data(), buf.data() + buf.size())); in TEST() 460 EXPECT_EQ(buf, map.encode()); in TEST() 463 map.encode(std::back_inserter(buf2)); in TEST() 467 map.encode([&](uint8_t c) { EXPECT_EQ(c, *iter++); }); in TEST() 473 EXPECT_EQ(nullptr, val.encode(buf.data(), buf.data() + buf.size())); in TEST() 479 EXPECT_EQ(nullptr, val.encode(buf.data(), buf.data() + buf.size())); in TEST() 482 EXPECT_EQ(nullptr, val.encode(buf.data(), buf.data() + buf.size())); in TEST() 488 EXPECT_EQ(nullptr, val.encode(buf.data(), buf.data() + buf.size())); in TEST() 491 EXPECT_EQ(nullptr, val.encode(buf.data(), buf.data() + buf.size())); in TEST() 498 EXPECT_EQ(nullptr, val.encode(buf.data(), buf.data() + buf.size())); in TEST() [all …]
|
/system/keymint/tests/src/bin/ |
D | encrypted-keyblob-parse.rs | 49 hex::encode(&keyblob.nonce), in process() 51 hex::encode(&keyblob.tag) in process()
|
/system/keymaster/contexts/ |
D | pure_soft_remote_provisioning_context.cpp | 149 .add(-4670552 /* Subject Pub Key */, coseKey.encode()) in GenerateBcc() 153 .encode(); in GenerateBcc() 183 return cppbor::Array().add(sign1.moveValue()).add(std::move(bcc)).encode(); in BuildProtectedDataPayload() 218 auto signedDataPayload = cppbor::Array().add(challenge).add(cppbor::Bstr(csrPayload.encode())); in BuildCsr() 219 auto signedData = constructCoseSign1(devicePrivKey_, signedDataPayload.encode(), {} /* aad */); in BuildCsr()
|
/system/extras/verity/fec/tests/ |
D | fec.py | 44 def encode(image, fec, roots): function 70 encode(image, temp_fec.name, roots)
|
/system/keymaster/cppcose/ |
D | cppcose.cpp | 241 .add(cppbor::Map().add(ALGORITHM, HMAC_256).canonicalize().encode()) in generateCoseMac0Mac() 244 .encode(); in generateCoseMac0Mac() 260 .add(cppbor::Map().add(ALGORITHM, HMAC_256).canonicalize().encode()) in constructCoseMac0() 311 .encode(); in createECDSACoseSign1Signature() 325 .encode(); in createCoseSign1Signature() 338 bytevec protParms = protectedParams.add(ALGORITHM, ES256).canonicalize().encode(); in constructECDSACoseSign1() 351 bytevec protParms = protectedParams.add(ALGORITHM, EDDSA).canonicalize().encode(); in constructCoseSign1() 403 cppbor::Array().add("Signature1").add(*protectedParams).add(aad).add(*payload).encode(); in verifyAndParseCoseSign1() 465 .encode(), in createCoseEncryptCiphertext() 478 .encode(); in constructCoseEncrypt() [all …]
|
/system/chre/apps/test/common/chre_cross_validator_sensor/src/ |
D | chre_cross_validator_sensor_manager.cc | 159 .values = {.funcs = {.encode = encodeFunc}, in makeDatapoint() 505 .funcs = {.encode = encodeThreeAxisSensorDatapoints}, in makeSensorThreeAxisData() 525 .funcs = {.encode = encodeFloatSensorDatapoints}, in makeSensorFloatData() 545 .funcs = {.encode = encodeProximitySensorDatapoints}, in makeSensorProximityData() 565 .funcs = {.encode = encodeStepCounterSensorDatapoints}, in makeSensorStepCounterData()
|
/system/security/provisioner/ |
D | rkp_factory_extraction_lib_test.cpp | 150 const DeviceInfo kVerifiedDeviceInfo = {cborDeviceInfo.canonicalize().encode()}; in TEST() 157 const ProtectedData kProtectedData = {cborProtectedData.encode()}; in TEST() 237 .encode(); in TEST()
|
D | rkp_factory_extraction_tool.cpp | 52 auto bytes = csr.encode(); in writeOutput()
|
/system/keymaster/android_keymaster/ |
D | android_keymaster.cpp | 419 std::vector<uint8_t> cosePublicKey = cose_public_key_map.canonicalize().encode(); in GenerateRkpKey() 427 std::vector<uint8_t> enc = macedKey->encode(); in GenerateRkpKey() 472 pubKeysToSign->encode()); in GenerateCsr() 482 std::vector<uint8_t> device_info = device_info_map->encode(); in GenerateCsr() 492 .encode()); in GenerateCsr() 535 std::vector<uint8_t> payload = coseEncrypted->encode(); in GenerateCsr() 577 auto csr_blob = csr->encode(); in GenerateCsrV2() 1047 .encode()); in GetRootOfTrust() 1056 .encode(); in GetRootOfTrust()
|
D | remote_provisioning_utils.cpp | 199 .encode()) in buildCertReqRecipients()
|
/system/chre/apps/test/common/shared/src/ |
D | send_message.cc | 63 result.errorMessage = {.funcs = {.encode = encodeErrorMessage}, in sendTestResultWithMsgToHost()
|
/system/tools/mkbootimg/tests/ |
D | mkbootimg_test.py | 707 self.assertEqual(raw_cmdline, cmdline.encode() + b'\x00') 709 extra_cmdline.encode() + b'\x00') 735 self.assertEqual(raw_cmdline, cmdline.encode() + b'\x00') 761 vendor_cmdline.encode() + b'\x00')
|
/system/extras/verity/fec/ |
D | main.cpp | 172 static int encode(image& ctx, const std::vector<std::string>& inp_filenames, in encode() function 403 return encode(ctx, inp_filenames, fec_filename); in main()
|
/system/tools/mkbootimg/ |
D | mkbootimg.py | 120 args.output.write(pack(f'{BOOT_MAGIC_SIZE}s', BOOT_MAGIC.encode())) 152 VENDOR_BOOT_MAGIC.encode())) 204 args.output.write(pack(f'{BOOT_MAGIC_SIZE}s', BOOT_MAGIC.encode())) 289 arg_bytes = arg.encode() + b'\x00'
|
/system/extras/verity/ |
D | build_verity_metadata.py | 73 return table.encode()
|
/system/keymint/ta/src/ |
D | cert.rs | 1119 fn encode(&self, encoder: &mut dyn der::Writer) -> der::Result<()> { in encode() method 1122 inner_len.encode(encoder)?; in encode() 1123 self.val.encode(encoder) in encode() 1261 assert_eq!(hex::encode(&got), want); in test_attest_ext_encode_decode() 1274 assert_eq!(hex::encode(got), want); in test_explicit_tagged_value() 1314 assert_eq!(hex::encode(&got), want); in test_authz_list_encode_decode()
|
/system/keymaster/include/keymaster/cppcose/ |
D | cppcose.h | 273 bytevec encode() { return key_->canonicalize().encode(); } in encode() function
|