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

12

/system/core/include/mincrypt/
H A Dhash-internal.h53 #define HASH_init(ctx) (ctx)->f->init(ctx)
54 #define HASH_update(ctx, data, len) (ctx)->f->update(ctx, data, len)
55 #define HASH_final(ctx) (ctx)->f->final(ctx)
56 #define HASH_hash(data, len, digest) (ctx)
[all...]
H A Dsha.h38 void SHA_init(SHA_CTX* ctx);
39 void SHA_update(SHA_CTX* ctx, const void* data, int len);
40 const uint8_t* SHA_final(SHA_CTX* ctx);
H A Dsha256.h39 void SHA256_init(SHA256_CTX* ctx);
40 void SHA256_update(SHA256_CTX* ctx, const void* data, int len);
41 const uint8_t* SHA256_final(SHA256_CTX* ctx);
/system/extras/verity/fec/
H A Dimage.cpp49 void image_init(image *ctx) argument
51 memset(ctx, 0, sizeof(*ctx));
54 static void mmap_image_free(image *ctx) argument
56 if (ctx->input) {
57 munmap(ctx->input, (size_t)ctx->inp_size);
58 close(ctx->inp_fd);
61 if (ctx->fec_mmap_addr) {
62 munmap(ctx
71 file_image_free(image *ctx) argument
84 image_free(image *ctx) argument
118 calculate_rounds(uint64_t size, image *ctx) argument
132 mmap_image_load(const std::vector<int>& fds, image *ctx, bool output_needed) argument
141 calculate_rounds(get_size(fd), ctx); local
192 image *ctx = (image *)priv; local
204 file_image_load(const std::vector<int>& fds, image *ctx) argument
279 image_load(const std::vector<std::string>& filenames, image *ctx, bool output_needed) argument
312 image_save(const std::string& filename, image *ctx) argument
335 mmap_image_ecc_new(image *ctx) argument
373 file_image_ecc_new(image *ctx) argument
386 image_ecc_new(const std::string& filename, image *ctx) argument
402 image_ecc_load(const std::string& filename, image *ctx) argument
482 image_ecc_save(image *ctx) argument
533 image_proc_ctx *ctx = (image_proc_ctx *)cookie; local
538 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
136 print_size(image& ctx) argument
172 encode(image& ctx, const std::vector<std::string>& inp_filenames, const std::string& fec_filename) argument
214 decode(image& ctx, const std::vector<std::string>& inp_filenames, const std::string& fec_filename, std::string& out_filename) argument
271 image ctx; local
[all...]
H A Dimage.h74 image *ctx; member in struct:image_proc_ctx
82 extern bool image_load(const std::vector<std::string>& filename, image *ctx,
84 extern bool image_save(const std::string& filename, image *ctx);
86 extern bool image_ecc_new(const std::string& filename, image *ctx);
87 extern bool image_ecc_load(const std::string& filename, image *ctx);
88 extern bool image_ecc_save(image *ctx);
90 extern bool image_process(image_proc_func f, image *ctx);
92 extern void image_init(image *ctx);
93 extern void image_free(image *ctx);
95 inline uint8_t image_get_interleaved_byte(uint64_t i, image *ctx) argument
106 image_set_interleaved_byte(uint64_t i, image *ctx, uint8_t value) argument
[all...]
/system/core/liblog/
H A Dlog_event_write.c34 android_log_context ctx = create_android_logger(tag); local
37 if (ctx) {
38 ret = android_log_write_string8_len(ctx, subTag, MAX_SUBTAG_LEN);
40 ret = android_log_write_int32(ctx, uid);
42 ret = android_log_write_string8_len(ctx, data, dataLen);
44 ret = android_log_write_list(ctx, LOG_ID_EVENTS);
48 android_log_destroy(&ctx);
H A Dlog_event_list.c88 LIBLOG_ABI_PUBLIC int android_log_destroy(android_log_context *ctx) { argument
91 context = (android_log_context_internal *)*ctx;
97 *ctx = NULL;
101 LIBLOG_ABI_PUBLIC int android_log_write_list_begin(android_log_context ctx) { argument
105 context = (android_log_context_internal *)ctx;
144 LIBLOG_ABI_PUBLIC int android_log_write_int32(android_log_context ctx, argument
149 context = (android_log_context_internal *)ctx;
180 LIBLOG_ABI_PUBLIC int android_log_write_int64(android_log_context ctx, argument
185 context = (android_log_context_internal *)ctx;
204 LIBLOG_ABI_PUBLIC int android_log_write_string8_len(android_log_context ctx, argument
241 android_log_write_string8(android_log_context ctx, const char *value) argument
246 android_log_write_float32(android_log_context ctx, float value) argument
272 android_log_write_list_end(android_log_context ctx) argument
302 android_log_write_list(android_log_context ctx, log_id_t id) argument
361 android_log_read_next_internal( android_log_context ctx, int peek) argument
531 android_log_read_next( android_log_context ctx) argument
536 android_log_peek_next( android_log_context ctx) argument
[all...]
/system/core/libmincrypt/
H A Dsha.c38 static void SHA1_Transform(SHA_CTX* ctx) { argument
41 uint8_t* p = ctx->buf;
56 A = ctx->state[0];
57 B = ctx->state[1];
58 C = ctx->state[2];
59 D = ctx->state[3];
60 E = ctx->state[4];
81 ctx->state[0] += A;
82 ctx->state[1] += B;
83 ctx
96 SHA_init(SHA_CTX* ctx) argument
107 SHA_update(SHA_CTX* ctx, const void* data, int len) argument
123 SHA_final(SHA_CTX* ctx) argument
150 SHA_CTX ctx; local
[all...]
H A Dsha256.c57 static void SHA256_Transform(SHA256_CTX* ctx) { argument
60 uint8_t* p = ctx->buf;
77 A = ctx->state[0];
78 B = ctx->state[1];
79 C = ctx->state[2];
80 D = ctx->state[3];
81 E = ctx->state[4];
82 F = ctx->state[5];
83 G = ctx->state[6];
84 H = ctx
122 SHA256_init(SHA256_CTX* ctx) argument
136 SHA256_update(SHA256_CTX* ctx, const void* data, int len) argument
152 SHA256_final(SHA256_CTX* ctx) argument
179 SHA256_CTX ctx; local
[all...]
/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.c374 #define ROUNDS(ctx) ((ctx)->rounds)
387 #define ROUNDS(ctx) (6 + OCB_KEY_LEN / 4)
421 #define ROUNDS(ctx) ((ctx)->rounds)
424 #define ROUNDS(ctx) (6 + OCB_KEY_LEN / 4)
644 static block getL(const ae_ctx* ctx, unsigned tz) { argument
646 return ctx->L[tz];
650 block rval = swap_if_le(ctx->L[L_TABLE_SZ - 1]);
680 void ae_free(ae_ctx* ctx) { argument
690 ae_clear(ae_ctx* ctx) argument
702 ae_init(ae_ctx* ctx, const void* key, int key_len, int nonce_len, int tag_len) argument
747 gen_offset_from_nonce(ae_ctx* ctx, const void* nonce) argument
788 process_ad(ae_ctx* ctx, const void* ad, int ad_len, int final) argument
917 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
1128 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 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...]
H A Dopenssl_utils.h37 EvpMdCtxCleaner(EVP_MD_CTX* ctx) : ctx_(ctx) {} argument
H A Drsa_operation.cpp531 UniquePtr<EVP_PKEY_CTX, EVP_PKEY_CTX_Delete> ctx(
533 if (!ctx.get())
536 if (EVP_PKEY_encrypt_init(ctx.get()) <= 0)
539 error = SetRsaPaddingInEvpContext(ctx.get(), false /* signing */);
542 error = SetOaepDigestIfRequired(ctx.get());
547 if (EVP_PKEY_encrypt(ctx.get(), nullptr /* out */, &outlen, data_.peek_read(),
565 if (EVP_PKEY_encrypt(ctx.get(), output->peek_write(), &outlen, to_encrypt, to_encrypt_len) <= 0)
584 UniquePtr<EVP_PKEY_CTX, EVP_PKEY_CTX_Delete> ctx(
586 if (!ctx.get())
589 if (EVP_PKEY_decrypt_init(ctx
[all...]
/system/core/libprocessgroup/
H A Dprocessgroup.cpp64 struct ctx { struct
105 static int initCtx(uid_t uid, int pid, struct ctx *ctx) argument
119 ctx->fd = fd;
120 ctx->buf_ptr = ctx->buf;
121 ctx->buf_len = 0;
122 ctx->initialized = true;
129 static int refillBuffer(struct ctx *ctx) argument
151 getOneAppProcess(uid_t uid, int appProcessPid, struct ctx *ctx) argument
259 struct ctx ctx; local
[all...]
/system/bt/stack/smp/
H A Daes.h85 aes_context ctx[1] );
92 const aes_context ctx[1] );
98 const aes_context ctx[1] );
105 const aes_context ctx[1] );
111 const aes_context ctx[1] );
/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.c225 EVP_MD_CTX *ctx = NULL; local
246 if ((ctx = EVP_MD_CTX_create()) == NULL) {
251 EVP_DigestInit(ctx, EVP_sha256());
265 EVP_DigestUpdate(ctx, buffer, bytes);
286 EVP_DigestUpdate(ctx, attrs, bytes);
287 EVP_DigestFinal(ctx, digest, NULL);
296 if (ctx) {
297 EVP_MD_CTX_destroy(ctx);
H A Dgenerate_verity_key.c48 BN_CTX* ctx = BN_CTX_new();
59 BN_mod_sqr(rr, r, n, ctx);
60 BN_div(NULL, rem, n, r32, ctx);
61 BN_mod_inverse(n0inv, rem, r32, ctx);
66 BN_div(rr, rem, rr, r32, ctx);
68 BN_div(n, rem, n, r32, ctx);
81 BN_CTX_free(ctx);
/system/core/liblog/tests/
H A Dliblog_test.cpp2062 android_log_context ctx; local
2064 EXPECT_TRUE(NULL != (ctx = create_android_logger(tag)));
2065 if (!ctx) {
2068 EXPECT_LE(0, android_log_write_int32(ctx, 0x40302010));
2069 EXPECT_LE(0, android_log_write_list(ctx, LOG_ID_EVENTS));
2070 EXPECT_LE(0, android_log_destroy(&ctx));
2071 EXPECT_TRUE(NULL == ctx);
2080 android_log_context ctx; local
2082 EXPECT_TRUE(NULL != (ctx = create_android_logger(tag)));
2083 if (!ctx) {
2098 android_log_context ctx; local
2119 android_log_context ctx; local
2142 android_log_context ctx; local
2161 android_log_context ctx; local
2211 android_log_context ctx; local
2249 android_log_context ctx; local
2434 android_log_context ctx; local
[all...]
/system/core/logd/
H A Dlibaudit.h44 char ctx[0]; member in struct:audit_sig_info
/system/core/include/log/
H A Dlog.h586 int android_log_write_list_begin(android_log_context ctx);
587 int android_log_write_list_end(android_log_context ctx);
589 int android_log_write_int32(android_log_context ctx, int32_t value);
590 int android_log_write_int64(android_log_context ctx, int64_t value);
591 int android_log_write_string8(android_log_context ctx, const char *value);
592 int android_log_write_string8_len(android_log_context ctx,
594 int android_log_write_float32(android_log_context ctx, float value);
598 int android_log_write_list(android_log_context ctx, log_id_t id);
605 android_log_list_element android_log_read_next(android_log_context ctx);
606 android_log_list_element android_log_peek_next(android_log_context ctx);
[all...]

Completed in 9327 milliseconds

12