Searched refs:ctx (Results 1 - 25 of 45) sorted by relevance

12

/system/core/logcat/
H A Dlogcat_main.cpp23 android_logcat_context ctx = create_android_logcat(); local
24 if (!ctx) return -1;
26 int retval = android_logcat_run_command(ctx, -1, -1, argc, argv, envp);
27 int ret = android_logcat_destroy(&ctx);
H A Dlogcatd_main.cpp27 android_logcat_context ctx = create_android_logcat(); local
28 if (!ctx) return -1;
49 ret = android_logcat_run_command(ctx, -1, -1, argv_hold.size() - 1,
65 int retval = android_logcat_run_command(ctx, -1, -1, argv_hold.size() - 1,
68 retval = android_logcat_destroy(&ctx);
/system/core/liblog/
H A Dlog_event_write.c33 android_log_context ctx = create_android_logger(tag); local
36 if (ctx) {
37 ret = android_log_write_string8_len(ctx, subTag, MAX_SUBTAG_LEN);
39 ret = android_log_write_int32(ctx, uid);
41 ret = android_log_write_string8_len(ctx, data, dataLen);
43 ret = android_log_write_list(ctx, LOG_ID_EVENTS);
47 android_log_destroy(&ctx);
H A Dstderr_write.c69 struct stderrContext* ctx; local
81 ctx = calloc(1, sizeof(struct stderrContext));
82 if (!ctx) {
86 ctx->logformat = android_log_format_new();
87 if (!ctx->logformat) {
88 free(ctx);
105 if (android_log_setPrintFormat(ctx->logformat, format) <= 0) {
114 android_log_setPrintFormat(ctx->logformat, format);
118 android_log_addFilterString(ctx->logformat, envStr);
120 stderrLoggerWrite.context.priv = ctx;
126 struct stderrContext* ctx = stderrLoggerWrite.context.priv; local
157 struct stderrContext* ctx = stderrLoggerWrite.context.priv; local
[all...]
H A Dlog_event_list.c87 LIBLOG_ABI_PUBLIC int android_log_destroy(android_log_context* ctx) { argument
90 context = (android_log_context_internal*)*ctx;
96 *ctx = NULL;
100 LIBLOG_ABI_PUBLIC int android_log_write_list_begin(android_log_context ctx) { argument
104 context = (android_log_context_internal*)ctx;
141 LIBLOG_ABI_PUBLIC int android_log_write_int32(android_log_context ctx, argument
146 context = (android_log_context_internal*)ctx;
176 LIBLOG_ABI_PUBLIC int android_log_write_int64(android_log_context ctx, argument
181 context = (android_log_context_internal*)ctx;
200 LIBLOG_ABI_PUBLIC int android_log_write_string8_len(android_log_context ctx, argument
237 android_log_write_string8(android_log_context ctx, const char* value) argument
242 android_log_write_float32(android_log_context ctx, float value) argument
268 android_log_write_list_end(android_log_context ctx) argument
298 android_log_write_list(android_log_context ctx, log_id_t id) argument
332 android_log_write_list_buffer(android_log_context ctx, const char** buffer) argument
387 android_log_read_next_internal( android_log_context ctx, int peek) argument
558 android_log_read_next(android_log_context ctx) argument
563 android_log_peek_next(android_log_context ctx) argument
[all...]
/system/extras/verity/fec/
H A Dimage.cpp47 void image_init(image *ctx) argument
49 memset(ctx, 0, sizeof(*ctx));
52 void image_free(image *ctx) argument
54 assert(ctx->input == ctx->output);
56 if (ctx->input) {
57 delete[] ctx->input;
60 if (ctx->fec) {
61 delete[] ctx
67 calculate_rounds(uint64_t size, image *ctx) argument
83 image *ctx = (image *)priv; local
94 file_image_load(const std::vector<int>& fds, image *ctx) argument
145 image_load(const std::vector<std::string>& filenames, image *ctx) argument
173 image_save(const std::string& filename, image *ctx) argument
192 image_ecc_new(const std::string& filename, image *ctx) argument
212 image_ecc_load(const std::string& filename, image *ctx) argument
292 image_ecc_save(image *ctx) argument
348 image_proc_ctx *ctx = (image_proc_ctx *)cookie; local
353 image_process(image_proc_func func, image *ctx) argument
[all...]
H A Dmain.cpp43 static void encode_rs(struct image_proc_ctx *ctx) argument
45 struct image *fcx = ctx->ctx;
50 for (i = ctx->start; i < ctx->end; i += fcx->rs_n) {
55 encode_rs_char(ctx->rs, data, &fcx->fec[ctx->fec_pos]);
56 ctx->fec_pos += fcx->roots;
60 static void decode_rs(struct image_proc_ctx *ctx) argument
62 struct image *fcx = ctx
137 print_size(image& ctx) argument
173 encode(image& ctx, const std::vector<std::string>& inp_filenames, const std::string& fec_filename) argument
215 decode(image& ctx, const std::vector<std::string>& inp_filenames, const std::string& fec_filename, std::string& out_filename) argument
276 image ctx; local
[all...]
H A Dimage.h72 image *ctx; member in struct:image_proc_ctx
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) argument
103 image_set_interleaved_byte(uint64_t i, image *ctx, uint8_t value) argument
[all...]
/system/core/logcat/include/log/
H A Dlogcat.h78 int android_logcat_run_command(android_logcat_context ctx, int output, int error,
87 int android_logcat_run_command_thread(android_logcat_context ctx, int argc,
89 int android_logcat_run_command_thread_running(android_logcat_context ctx);
98 int android_logcat_destroy(android_logcat_context* ctx);
113 FILE* android_logcat_popen(android_logcat_context* ctx, const char* command);
114 int android_logcat_pclose(android_logcat_context* ctx, FILE* output);
/system/keymaster/
H A Dae.h59 void ae_free(ae_ctx* ctx); /* Deallocate ae_ctx struct */
60 int ae_clear(ae_ctx* ctx); /* Undo initialization */
75 int ae_init(ae_ctx* ctx, const void* key, int key_len, int nonce_len, int tag_len);
81 * ctx - Pointer to an ae_ctx structure to be initialized
94 int ae_encrypt(ae_ctx* ctx, const void* nonce, const void* pt, int pt_len, const void* ad,
101 * ctx - Pointer to an ae_ctx structure initialized by ae_init.
124 int ae_decrypt(ae_ctx* ctx, const void* nonce, const void* ct, int ct_len, const void* ad,
131 * ctx - Pointer to an ae_ctx structure initialized by ae_init.
H A Diso18033kdf.cpp39 EVP_MD_CTX ctx;
40 EvpMdCtxCleaner ctxCleaner(&ctx);
41 EVP_MD_CTX_init(&ctx);
51 if (!EVP_DigestInit_ex(&ctx, EVP_sha1(), nullptr /* default digest */))
55 if (!EVP_DigestInit_ex(&ctx, EVP_sha256(), nullptr /* default digest */))
62 if (!EVP_DigestUpdate(&ctx, secret_key_.get(), secret_key_len_) ||
64 !EVP_DigestUpdate(&ctx, counter.get(), 4))
68 if (!EVP_DigestUpdate(&ctx, info, info_len))
74 if (!EVP_DigestFinal_ex(&ctx, digest_result.get(), &uint32_digest_size_) ||
H A Docb.c375 #define ROUNDS(ctx) ((ctx)->rounds)
388 #define ROUNDS(ctx) (6 + OCB_KEY_LEN / 4)
422 #define ROUNDS(ctx) ((ctx)->rounds)
425 #define ROUNDS(ctx) (6 + OCB_KEY_LEN / 4)
645 static block getL(const ae_ctx* ctx, unsigned tz) { argument
647 return ctx->L[tz];
651 block rval = swap_if_le(ctx->L[L_TABLE_SZ - 1]);
681 void ae_free(ae_ctx* ctx) { argument
691 ae_clear(ae_ctx* ctx) argument
703 ae_init(ae_ctx* ctx, const void* key, int key_len, int nonce_len, int tag_len) argument
748 gen_offset_from_nonce(ae_ctx* ctx, const void* nonce) argument
789 process_ad(ae_ctx* ctx, const void* ad, int ad_len, int final) argument
918 ae_encrypt(ae_ctx* ctx, const void* nonce, const void* pt, int pt_len, const void* ad, int ad_len, void* ct, void* tag, int final) argument
1129 ae_decrypt(ae_ctx* ctx, const void* nonce, const void* ct, int ct_len, const void* ad, int ad_len, void* pt, const void* tag, int final) argument
[all...]
H A Dintegrity_assured_key_blob.cpp45 explicit HmacCleanup(HMAC_CTX* ctx) : ctx_(ctx) {} argument
60 HMAC_CTX ctx; local
61 HMAC_CTX_init(&ctx);
63 if (!HMAC_Init_ex(&ctx, HMAC_KEY, sizeof(HMAC_KEY), md, NULL /* engine */))
65 HmacCleanup cleanup(&ctx);
69 if (!HMAC_Update(&ctx, serialized_data, serialized_data_size) ||
70 !HMAC_Update(&ctx, hidden_bytes.get(), hidden_bytes_size) || //
71 !HMAC_Final(&ctx, tmp, &tmp_len))
H A Docb_utils.cpp72 AeCtx* ctx) {
90 if (!ctx->get() || !hash_buf.get() || !derived_key.get())
109 if (ae_init(ctx->get(), derived_key.get(), AES_BLOCK_SIZE /* key length */, OCB_NONCE_LENGTH,
111 memset_s(ctx->get(), 0, ae_ctx_sizeof());
128 AeCtx ctx;
129 if (!ctx.get())
133 InitializeKeyWrappingContext(hw_enforced, sw_enforced, hidden, master_key, &ctx);
140 int ae_err = ae_encrypt(ctx.get(), nonce.peek_read(), plaintext.key_material,
164 AeCtx ctx;
165 if (!ctx
68 InitializeKeyWrappingContext(const AuthorizationSet& hw_enforced, const AuthorizationSet& sw_enforced, const AuthorizationSet& hidden, const KeymasterKeyBlob& master_key, AeCtx* ctx) argument
[all...]
/system/core/include/log/
H A Dlog_event_list.h88 int android_log_write_list_begin(android_log_context ctx);
89 int android_log_write_list_end(android_log_context ctx);
91 int android_log_write_int32(android_log_context ctx, int32_t value);
92 int android_log_write_int64(android_log_context ctx, int64_t value);
93 int android_log_write_string8(android_log_context ctx, const char* value);
94 int android_log_write_string8_len(android_log_context ctx, const char* value,
96 int android_log_write_float32(android_log_context ctx, float value);
100 int android_log_write_list(android_log_context ctx, log_id_t id);
107 android_log_list_element android_log_read_next(android_log_context ctx);
108 android_log_list_element android_log_peek_next(android_log_context ctx);
122 android_log_context ctx; member in class:android_log_event_list
[all...]
/system/core/liblog/include/log/
H A Dlog_event_list.h88 int android_log_write_list_begin(android_log_context ctx);
89 int android_log_write_list_end(android_log_context ctx);
91 int android_log_write_int32(android_log_context ctx, int32_t value);
92 int android_log_write_int64(android_log_context ctx, int64_t value);
93 int android_log_write_string8(android_log_context ctx, const char* value);
94 int android_log_write_string8_len(android_log_context ctx, const char* value,
96 int android_log_write_float32(android_log_context ctx, float value);
100 int android_log_write_list(android_log_context ctx, log_id_t id);
107 android_log_list_element android_log_read_next(android_log_context ctx);
108 android_log_list_element android_log_peek_next(android_log_context ctx);
122 android_log_context ctx; member in class:android_log_event_list
[all...]
/system/core/libprocessgroup/
H A Dprocessgroup.cpp67 struct ctx { struct
108 static int initCtx(uid_t uid, int pid, struct ctx *ctx) argument
122 ctx->fd = fd;
123 ctx->buf_ptr = ctx->buf;
124 ctx->buf_len = 0;
125 ctx->initialized = true;
132 static int refillBuffer(struct ctx *ctx) argument
154 getOneAppProcess(uid_t uid, int appProcessPid, struct ctx *ctx) argument
257 struct ctx ctx; local
[all...]
/system/bt/stack/smp/
H A Daes.h84 aes_context ctx[1]);
90 unsigned char out[N_BLOCK], const aes_context ctx[1]);
94 const aes_context ctx[1]);
100 unsigned char out[N_BLOCK], const aes_context ctx[1]);
104 const aes_context ctx[1]);
/system/core/logcat/tests/
H A Dlogcat_test.cpp68 logcat_define(ctx);
77 ctx, logcat_executable
96 logcat_pclose(ctx, fp);
105 logcat_define(ctx);
108 (fp = logcat_popen(ctx, logcat_executable
121 logcat_pclose(ctx, fp);
163 logcat_define(ctx);
178 ctx, logcat_executable
190 logcat_pclose(ctx, fp);
240 logcat_define(ctx);
[all...]
H A Dexec_benchmark.cpp41 android_logcat_context ctx; local
42 FILE* fp = android_logcat_popen(&ctx, cmd);
45 android_logcat_pclose(&ctx, fp);
/system/extras/verity/
H A Dbuild_verity_tree.cpp95 struct sparse_hash_ctx *ctx = (struct sparse_hash_ctx *)priv; local
96 assert(len % ctx->block_size == 0);
99 hash_blocks(ctx->md, (const unsigned char *)data, len,
100 ctx->hashes, &s,
101 ctx->salt, ctx->salt_size, ctx->block_size);
102 ctx->hashes += s;
104 for (size_t i = 0; i < (size_t)len; i += ctx->block_size) {
105 memcpy(ctx
318 struct sparse_hash_ctx ctx; local
[all...]
H A Dverify_boot_signature.c226 EVP_MD_CTX *ctx = NULL; local
247 if ((ctx = EVP_MD_CTX_create()) == NULL) {
252 EVP_DigestInit(ctx, EVP_sha256());
266 EVP_DigestUpdate(ctx, buffer, bytes);
287 EVP_DigestUpdate(ctx, attrs, bytes);
288 EVP_DigestFinal(ctx, digest, NULL);
297 if (ctx) {
298 EVP_MD_CTX_destroy(ctx);
/system/core/liblog/tests/
H A Dliblog_test.cpp2569 android_log_context ctx; local
2571 EXPECT_TRUE(NULL != (ctx = create_android_logger(tag)));
2572 if (!ctx) {
2575 EXPECT_LE(0, android_log_write_int32(ctx, 0x40302010));
2576 EXPECT_LE(0, android_log_write_list(ctx, LOG_ID_EVENTS));
2577 EXPECT_LE(0, android_log_destroy(&ctx));
2578 EXPECT_TRUE(NULL == ctx);
2586 android_log_context ctx; local
2588 EXPECT_TRUE(NULL != (ctx = create_android_logger(tag)));
2589 if (!ctx) {
2603 android_log_context ctx; local
2624 android_log_context ctx; local
2646 android_log_context ctx; local
2665 android_log_context ctx; local
2713 android_log_context ctx; local
2752 android_log_context ctx; local
2993 android_log_context ctx; local
[all...]
/system/core/libcrypto_utils/
H A Dandroid_pubkey.c125 BN_CTX* ctx = BN_CTX_new(); local
139 if (!ctx || !r32 || !n0inv || !BN_set_bit(r32, 32) ||
140 !BN_mod(n0inv, key->n, r32, ctx) ||
141 !BN_mod_inverse(n0inv, n0inv, r32, ctx) || !BN_sub(n0inv, r32, n0inv)) {
152 if (!ctx || !rr || !BN_set_bit(rr, ANDROID_PUBKEY_MODULUS_SIZE * 8) ||
153 !BN_mod_sqr(rr, rr, key->n, ctx) ||
167 BN_CTX_free(ctx);
/system/core/logd/
H A Dlibaudit.h41 char ctx[0]; member in struct:audit_sig_info

Completed in 373 milliseconds

12