/system/chre/apps/nearby/location/lbs/contexthub/nanoapps/nearby/crypto/ |
D | hmac.c | 21 static void sha2InitHmacKeyUpdate(struct HmacContext *ctx) { in sha2InitHmacKeyUpdate() argument 23 sha2init(&ctx->sha2ctx); in sha2InitHmacKeyUpdate() 24 sha2processBytes(&ctx->sha2ctx, ctx->k_ipad, sizeof(ctx->k_ipad)); in sha2InitHmacKeyUpdate() 27 void hmacInit(struct HmacContext *ctx, const void *inKey, const size_t keyLen) { in hmacInit() argument 29 memset(ctx->k, 0, sizeof(ctx->k)); in hmacInit() 30 memset(ctx->k_ipad, 0x36, sizeof(ctx->k_ipad)); in hmacInit() 31 memset(ctx->k_opad, 0x5c, sizeof(ctx->k_opad)); in hmacInit() 32 memcpy(ctx->k, inKey, keyLen); in hmacInit() 33 ctx->is_hmac_updated = false; in hmacInit() 37 ctx->k_ipad[i] ^= ctx->k[i]; in hmacInit() [all …]
|
D | sha2.c | 35 void sha2init(struct Sha2Context *ctx) { in sha2init() argument 36 ctx->h[0] = 0x6a09e667; in sha2init() 37 ctx->h[1] = 0xbb67ae85; in sha2init() 38 ctx->h[2] = 0x3c6ef372; in sha2init() 39 ctx->h[3] = 0xa54ff53a; in sha2init() 40 ctx->h[4] = 0x510e527f; in sha2init() 41 ctx->h[5] = 0x9b05688c; in sha2init() 42 ctx->h[6] = 0x1f83d9ab; in sha2init() 43 ctx->h[7] = 0x5be0cd19; in sha2init() 44 ctx->msgLen = 0; in sha2init() [all …]
|
/system/extras/verity/fec/ |
D | image.cpp | 46 void image_init(image *ctx) in image_init() argument 48 memset(ctx, 0, sizeof(*ctx)); in image_init() 51 void image_free(image *ctx) in image_free() argument 53 assert(ctx->input == ctx->output); in image_free() 55 if (ctx->input) { in image_free() 56 delete[] ctx->input; in image_free() 59 if (ctx->fec) { in image_free() 60 delete[] ctx->fec; in image_free() 63 image_init(ctx); in image_free() 66 static void calculate_rounds(uint64_t size, image *ctx) in calculate_rounds() argument [all …]
|
D | main.cpp | 42 static void encode_rs(struct image_proc_ctx *ctx) in encode_rs() argument 44 struct image *fcx = ctx->ctx; in encode_rs() 49 for (i = ctx->start; i < ctx->end; i += fcx->rs_n) { in encode_rs() 54 encode_rs_char(ctx->rs, data, &fcx->fec[ctx->fec_pos]); in encode_rs() 55 ctx->fec_pos += fcx->roots; in encode_rs() 59 static void decode_rs(struct image_proc_ctx *ctx) in decode_rs() argument 61 struct image *fcx = ctx->ctx; in decode_rs() 68 for (i = ctx->start; i < ctx->end; i += fcx->rs_n) { in decode_rs() 73 memcpy(&data[fcx->rs_n], &fcx->fec[ctx->fec_pos], fcx->roots); in decode_rs() 74 rv = decode_rs_char(ctx->rs, data, nullptr, 0); in decode_rs() [all …]
|
D | image.h | 72 image *ctx; member 80 extern bool image_load(const std::vector<std::string>& filename, image *ctx); 81 extern bool image_save(const std::string& filename, image *ctx); 83 extern bool image_ecc_new(const std::string& filename, image *ctx); 84 extern bool image_ecc_load(const std::string& filename, image *ctx); 85 extern bool image_ecc_save(image *ctx); 87 extern bool image_process(image_proc_func f, image *ctx); 89 extern void image_init(image *ctx); 90 extern void image_free(image *ctx); 92 inline uint8_t image_get_interleaved_byte(uint64_t i, image *ctx) in image_get_interleaved_byte() argument [all …]
|
/system/update_engine/payload_generator/ |
D | erofs_iterate.h | 28 struct erofs_dir_context ctx; member 36 static_assert(offsetof(erofs_iterate_dir_context, ctx) == 0); 53 .ctx.dir = &root_dir, .ctx.pnid = sbi->root_nid, in erofs_iterate_root_dir() 54 .ctx.cb = [](struct erofs_dir_context* arg) -> int { in erofs_iterate_root_dir() 55 auto ctx = reinterpret_cast<erofs_iterate_dir_context*>(arg); in erofs_iterate_root_dir() member 56 const auto parent_dir = ctx->ctx.dir; in erofs_iterate_root_dir() 57 const auto sbi = ctx->ctx.dir->sbi; in erofs_iterate_root_dir() 59 auto& path = ctx->path; in erofs_iterate_root_dir() 63 path.end(), ctx->ctx.dname, ctx->ctx.dname + ctx->ctx.de_namelen); in erofs_iterate_root_dir() 64 auto cb = static_cast<Callable*>(ctx->arg); in erofs_iterate_root_dir() [all …]
|
/system/sepolicy/build/soong/ |
D | sepolicy_freeze.go | 27 ctx := android.InitRegistrationContext 28 ctx.RegisterParallelSingletonModuleType("se_freeze_test", freezeTestFactory) 37 android.AddLoadHook(f, func(ctx android.LoadHookContext) { 38 f.loadHook(ctx) 48 func (f *freezeTestModule) shouldRunTest(ctx android.EarlyModuleContext) bool { 49 val, _ := ctx.Config().GetBuildFlag("RELEASE_BOARD_API_LEVEL_FROZEN") 53 func (f *freezeTestModule) loadHook(ctx android.LoadHookContext) { 54 extraDirs := ctx.DeviceConfig().SepolicyFreezeTestExtraDirs() 55 extraPrebuiltDirs := ctx.DeviceConfig().SepolicyFreezeTestExtraPrebuiltDirs() 57 if !f.shouldRunTest(ctx) { [all …]
|
D | build_files.go | 56 func (b *buildFiles) findSrcsInDirs(ctx android.ModuleContext, dirs ...string) android.Paths { 61 files, err := ctx.GlobWithDeps(path, nil) 63 ctx.ModuleErrorf("glob: %s", err.Error()) 66 result = append(result, android.PathForSource(ctx, f)) 73 func (b *buildFiles) DepsMutator(ctx android.BottomUpMutatorContext) { 82 func (b *buildFiles) GenerateAndroidBuildActions(ctx android.ModuleContext) { 84 b.srcs[".reqd_mask"] = b.findSrcsInDirs(ctx, filepath.Join("system", "sepolicy", "reqd_mask")) 85 b.srcs[".plat_public"] = b.findSrcsInDirs(ctx, filepath.Join("system", "sepolicy", "public")) 86 b.srcs[".plat_private"] = b.findSrcsInDirs(ctx, filepath.Join("system", "sepolicy", "private")) 87 b.srcs[".plat_vendor"] = b.findSrcsInDirs(ctx, filepath.Join("system", "sepolicy", "vendor")) [all …]
|
D | selinux_contexts.go | 66 build func(ctx android.ModuleContext, inputs android.Paths) android.Path 67 deps func(ctx android.BottomUpMutatorContext) 112 func (m *selinuxContextsModule) DepsMutator(ctx android.BottomUpMutatorContext) { 113 m.flagDeps(ctx) 116 m.deps(ctx) 120 ctx.AddFarVariationDependencies([]blueprint.Variation{ 122 }, reuseContextsDepTag, ctx.ModuleName()) 126 func (m *selinuxContextsModule) propertyContextsDeps(ctx android.BottomUpMutatorContext) { 127 for _, lib := range sysprop.SyspropLibraries(ctx.Config()) { 128 ctx.AddFarVariationDependencies([]blueprint.Variation{}, syspropLibraryDepTag, lib) [all …]
|
D | mac_permissions.go | 62 func getAllPlatformKeyPaths(ctx android.ModuleContext) android.Paths { 65 defaultCertificateDir := ctx.Config().DefaultAppCertificateDir(ctx) 67 platformKeys = append(platformKeys, defaultCertificateDir.Join(ctx, key+".x509.pem")) 73 func (m *macPermissionsModule) DepsMutator(ctx android.BottomUpMutatorContext) { 81 func buildVariant(ctx android.ModuleContext) string { 82 if ctx.Config().Eng() { 85 if ctx.Config().Debuggable() { 91 func (m *macPermissionsModule) GenerateAndroidBuildActions(ctx android.ModuleContext) { 92 platformKeys := getAllPlatformKeyPaths(ctx) 93 keys := android.PathsForModuleSrc(ctx, m.properties.Keys) [all …]
|
D | flags.go | 31 ctx := android.InitRegistrationContext 32 ctx.RegisterModuleType("se_flags", flagsFactory) 33 ctx.RegisterModuleType("se_flags_collector", flagsCollectorFactory) 86 func (f *flagsModule) DepsMutator(ctx android.BottomUpMutatorContext) { 89 ctx.AddReverseDependency(ctx.Module(), flagsDepTag, export) 93 func (f *flagsModule) GenerateAndroidBuildActions(ctx android.ModuleContext) { 94 android.SetProvider(ctx, flagsProviderKey, flagsInfo{ 119 func (f *flagsCollectorModule) GenerateAndroidBuildActions(ctx android.ModuleContext) { 121 ctx.VisitDirectDepsWithTag(flagsDepTag, func(m android.Module) { 122 if dep, ok := android.OtherModuleProvider(ctx, m, flagsProviderKey); ok { [all …]
|
D | compat_cil.go | 30 ctx := android.InitRegistrationContext 31 ctx.RegisterModuleType("se_compat_cil", compatCilFactory) 32 ctx.RegisterParallelSingletonModuleType("se_compat_test", compatTestFactory) 66 func (c *compatCil) expandSeSources(ctx android.ModuleContext) android.Paths { 67 return android.PathsForModuleSrc(ctx, c.properties.Srcs) 70 func (c *compatCil) shouldSkipBuild(ctx android.ModuleContext) bool { 71 return proptools.String(c.properties.Version) == ctx.DeviceConfig().PlatformSepolicyVersion() 74 func (c *compatCil) GenerateAndroidBuildActions(ctx android.ModuleContext) { 76 ctx.ModuleErrorf("Compat cil files only support system and system_ext partitions") 79 if c.shouldSkipBuild(ctx) { [all …]
|
D | policy.go | 148 func (c *policyConf) buildVariant(ctx android.ModuleContext) string { 152 if ctx.Config().Eng() { 155 if ctx.Config().Debuggable() { 169 func (c *policyConf) withAsan(ctx android.ModuleContext) string { 170 isAsanDevice := android.InList("address", ctx.Config().SanitizeDevice()) 174 func (c *policyConf) sepolicySplit(ctx android.ModuleContext) string { 184 func (c *policyConf) compatibleProperty(ctx android.ModuleContext) string { 194 func (c *policyConf) trebleSyspropNeverallow(ctx android.ModuleContext) string { 201 return strconv.FormatBool(!ctx.DeviceConfig().BuildBrokenTrebleSyspropNeverallow()) 204 func (c *policyConf) enforceSyspropOwner(ctx android.ModuleContext) string { [all …]
|
/system/logging/liblog/include/log/ |
D | log_event_list.h | 68 int android_log_write_list_begin(android_log_context ctx); 69 int android_log_write_list_end(android_log_context ctx); 71 int android_log_write_int32(android_log_context ctx, int32_t value); 72 int android_log_write_int64(android_log_context ctx, int64_t value); 73 int android_log_write_string8(android_log_context ctx, const char* value); 74 int android_log_write_string8_len(android_log_context ctx, const char* value, 76 int android_log_write_float32(android_log_context ctx, float value); 80 int android_log_write_list(android_log_context ctx, log_id_t id); 87 android_log_list_element android_log_read_next(android_log_context ctx); 88 android_log_list_element android_log_peek_next(android_log_context ctx); [all …]
|
/system/nfc/src/fuzzers/rw/ |
D | t1t.cc | 92 static bool Init_WriteErase8(Fuzz_Context& ctx) { in Init_WriteErase8() argument 96 auto scratch = ctx.GetBuffer(sizeof(data), data); in Init_WriteErase8() 100 static bool Init_WriteNoErase8(Fuzz_Context& ctx) { in Init_WriteNoErase8() argument 104 auto scratch = ctx.GetBuffer(sizeof(data), data); in Init_WriteNoErase8() 114 static bool Init_ReadNdef(Fuzz_Context& ctx) { in Init_ReadNdef() argument 119 auto scratch = ctx.GetBuffer(4096); in Init_ReadNdef() 122 static bool Init_WriteNdef(Fuzz_Context& ctx) { in Init_WriteNdef() argument 126 auto scratch = ctx.GetBuffer(sizeof(data), data); in Init_WriteNdef() 133 static bool Fuzz_Init(Fuzz_Context& ctx) { in Fuzz_Init() argument 134 if (!Init(ctx)) { in Fuzz_Init() [all …]
|
D | t5t.cc | 83 static bool Init_WriteSingleBlock(Fuzz_Context& ctx) { in Init_WriteSingleBlock() argument 87 auto scratch = ctx.GetBuffer(sizeof(data), data); in Init_WriteSingleBlock() 99 static bool Init_WriteMultipleBlocks(Fuzz_Context& ctx) { in Init_WriteMultipleBlocks() argument 100 auto scratch = ctx.GetBuffer(16 * 10); in Init_WriteMultipleBlocks() 146 static bool Init_UpdateNDef(Fuzz_Context& ctx) { in Init_UpdateNDef() argument 150 auto scratch = ctx.GetBuffer(sizeof(data), data); in Init_UpdateNDef() 166 static bool Fuzz_Init(Fuzz_Context& ctx) { in Fuzz_Init() argument 167 if (!Init(ctx)) { in Fuzz_Init() 173 switch (ctx.SubType) { in Fuzz_Init() 175 result = Init_Inventory(ctx); in Fuzz_Init() [all …]
|
D | t2t.cc | 59 static bool Init_Write(Fuzz_Context& ctx) { in Init_Write() argument 63 auto scratch = ctx.GetBuffer(sizeof(data), data); in Init_Write() 75 static bool Init_WriteNDef(Fuzz_Context& ctx) { in Init_WriteNDef() argument 79 auto scratch = ctx.GetBuffer(sizeof(data), data); in Init_WriteNDef() 86 static bool Init_ReadNDef(Fuzz_Context& ctx) { in Init_ReadNDef() argument 87 auto scratch = ctx.GetBuffer(256); in Init_ReadNDef() 108 static bool Fuzz_Init(Fuzz_Context& ctx) { in Fuzz_Init() argument 109 if (!Init(ctx)) { in Fuzz_Init() 115 switch (ctx.SubType) { in Fuzz_Init() 117 result = Init_PresenceCheck(ctx); in Fuzz_Init() [all …]
|
D | mfc.cc | 60 static bool Init_ReadNDef(Fuzz_Context& ctx) { in Init_ReadNDef() argument 61 auto scratch = ctx.GetBuffer(256); in Init_ReadNDef() 65 static bool Init_WriteNDef(Fuzz_Context& ctx) { in Init_WriteNDef() argument 69 auto scratch = ctx.GetBuffer(sizeof(data), data); in Init_WriteNDef() 78 static bool Fuzz_Init(Fuzz_Context& ctx) { in Fuzz_Init() argument 79 if (!Init(ctx)) { in Fuzz_Init() 85 switch (ctx.SubType) { in Fuzz_Init() 87 result = Init_DetectNDef(ctx); in Fuzz_Init() 90 result = Init_WriteNDef(ctx); in Fuzz_Init() 93 result = Init_ReadNDef(ctx); in Fuzz_Init() [all …]
|
D | t4t.cc | 64 static bool Init_UpdateNDef(Fuzz_Context& ctx) { in Init_UpdateNDef() argument 68 auto scratch = ctx.GetBuffer(sizeof(data), data); in Init_UpdateNDef() 80 static bool Fuzz_Init(Fuzz_Context& ctx) { in Fuzz_Init() argument 81 if (!Init(ctx)) { in Fuzz_Init() 87 switch (ctx.SubType) { in Fuzz_Init() 89 result = Init_DetectNDef(ctx); in Fuzz_Init() 92 result = Init_UpdateNDef(ctx); in Fuzz_Init() 95 result = Init_PresenceCheck(ctx); in Fuzz_Init() 98 result = Init_ReadNDef(ctx); in Fuzz_Init() 101 result = Init_FormatNDef(ctx); in Fuzz_Init() [all …]
|
/system/linkerconfig/contents/tests/configuration/ |
D | apexconfig_test.cc | 59 android::linkerconfig::contents::Context ctx; in TEST_F() local 62 ctx, target_apex); in TEST_F() 71 android::linkerconfig::contents::Context ctx; in TEST_F() local 72 ctx.SetApexModules({PrepareApex("foo", {"a.so"}, {"b.so"}), in TEST_F() 77 ctx, target_apex); in TEST_F() 87 android::linkerconfig::contents::Context ctx; in TEST_F() local 91 ctx.SetVendorConfig(vendor_config); in TEST_F() 96 ctx.SetApexModules({vendor_apex, CreateTestVndkApex()}); in TEST_F() 98 ctx, vendor_apex); in TEST_F() 108 android::linkerconfig::contents::Context ctx; in TEST_F() local [all …]
|
/system/logging/rust/ |
D | structured_logger.rs | 22 fn add_to_context(&self, ctx: LogContext) -> Result<LogContext, LogContextError>; in add_to_context() 26 fn add_to_context(&self, ctx: LogContext) -> Result<LogContext, LogContextError> { in add_to_context() 27 ctx.append_f32(*self) in add_to_context() 32 fn add_to_context(&self, ctx: LogContext) -> Result<LogContext, LogContextError> { in add_to_context() 33 ctx.append_i32(*self) in add_to_context() 38 fn add_to_context(&self, ctx: LogContext) -> Result<LogContext, LogContextError> { in add_to_context() 39 ctx.append_i64(*self) in add_to_context() 44 fn add_to_context(&self, ctx: LogContext) -> Result<LogContext, LogContextError> { in add_to_context() 45 ctx.append_str(self) in add_to_context() 50 fn add_to_context(&self, ctx: LogContext) -> Result<LogContext, LogContextError> { in add_to_context() [all …]
|
/system/core/libstats/push_compat/include/ |
D | stats_event_list.h | 25 void reset_log_context(android_log_context ctx); 29 int android_log_write_char_array(android_log_context ctx, const char* value, size_t len); 46 android_log_context ctx; 54 ctx = create_android_logger(static_cast<uint32_t>(tag)); in stats_event_list() 56 ~stats_event_list() { android_log_destroy(&ctx); } in ~stats_event_list() 59 int retval = android_log_destroy(&ctx); in close() 67 operator android_log_context() const { return ctx; } in android_log_context() 73 int retval = android_log_write_list_begin(ctx); in begin() 80 int retval = android_log_write_list_end(ctx); in end() 88 int retval = android_log_write_int32(ctx, value); [all …]
|
/system/linkerconfig/contents/section/ |
D | apexdefault.cc | 48 Section BuildApexDefaultSection(Context& ctx, const ApexInfo& apex_info) { in BuildApexDefaultSection() argument 49 ctx.SetCurrentSection(SectionType::Other); in BuildApexDefaultSection() 57 for (const auto& apex : ctx.GetApexModules()) { in BuildApexDefaultSection() 75 namespaces.emplace_back(BuildApexEmptyDefaultNamespace(ctx, apex_info)); in BuildApexDefaultSection() 77 namespaces.emplace_back(BuildApexDefaultNamespace(ctx, apex_info)); in BuildApexDefaultSection() 79 namespaces.emplace_back(BuildApexPlatformNamespace(ctx)); in BuildApexDefaultSection() 85 namespaces.emplace_back(BuildRsNamespace(ctx)); in BuildApexDefaultSection() 86 auto vendor = BuildVendorNamespace(ctx, "vendor"); in BuildApexDefaultSection() 92 BuildVndkNamespace(ctx, VndkUserPartition::Vendor)); in BuildApexDefaultSection() 94 namespaces.emplace_back(BuildVndkInSystemNamespace(ctx)); in BuildApexDefaultSection() [all …]
|
/system/nfc/src/fuzzers/ce/ |
D | t3t.cc | 44 static bool Init_ReadOnly(Fuzz_Context& ctx) { in Init_ReadOnly() argument 48 auto p_buf = ctx.GetBuffer(size_max); in Init_ReadOnly() 54 static bool Init_ReadWrite(Fuzz_Context& ctx) { in Init_ReadWrite() argument 58 auto p_buf = ctx.GetBuffer(size_max); in Init_ReadWrite() 59 auto p_scratch = ctx.GetBuffer(size_max); in Init_ReadWrite() 65 static bool Fuzz_Init(Fuzz_Context& ctx) { in Fuzz_Init() argument 66 if (!Init(ctx)) { in Fuzz_Init() 72 switch (ctx.SubType) { in Fuzz_Init() 74 result = Init_ReadOnly(ctx); in Fuzz_Init() 77 result = Init_ReadWrite(ctx); in Fuzz_Init() [all …]
|
/system/logging/liblog/include_vndk/log/ |
D | log_event_list.h | 50 int android_log_write_list_begin(android_log_context ctx); 51 int android_log_write_list_end(android_log_context ctx); 53 int android_log_write_int32(android_log_context ctx, int32_t value); 54 int android_log_write_int64(android_log_context ctx, int64_t value); 55 int android_log_write_string8(android_log_context ctx, const char* value); 56 int android_log_write_string8_len(android_log_context ctx, const char* value, 58 int android_log_write_float32(android_log_context ctx, float value); 62 int android_log_write_list(android_log_context ctx, log_id_t id); 65 int android_log_reset(android_log_context ctx); 68 int android_log_parser_reset(android_log_context ctx, [all …]
|