Lines Matching defs:in

5  * you may not use this file except in compliance with the License.
10 * Unless required by applicable law or agreed to in writing, software
54 * each file stores one key-value pair. Keys are encoded in file names, and
141 ALOGE("could not open keymaster device in %s (%s)",
157 /* Here is the encoding of keys. This is necessary in order to allow arbitrary
158 * characters in keys. Characters in [0-~] are not encoded. Others are encoded
161 * [0-o]. Therefore in the worst case the length of a key gets doubled. Note
165 const uint8_t* in = key->value;
167 for (int i = length; i > 0; --i, ++in, ++out) {
168 if (*in >= '0' && *in <= '~') {
169 *out = *in;
171 *out = '+' + (*in >> 6);
172 *++out = '0' + (*in & 0x3F);
187 static int decode_key(uint8_t* out, const char* in, int length) {
188 for (int i = 0; i < length; ++i, ++in, ++out) {
189 if (*in >= '0' && *in <= '~') {
190 *out = *in;
192 *out = (*in - '+') << 6;
193 *out |= (*++in - '0') & 0x3F;
254 /* Here is the file format. There are two parts in blob.value, the secret and
255 * the description. The secret is stored in ciphertext, and its original size
256 * can be found in blob.length. The description is stored after the secret in
257 * plaintext, and its size is specified in blob.info. The total size of the two
286 int32_t length; // in network byte order when encrypted
395 int in = open(filename, O_RDONLY);
396 if (in == -1) {
399 // fileLength may be less than sizeof(mBlob) since the in
402 size_t fileLength = readFully(in, (uint8_t*) &mBlob, sizeof(mBlob));
403 if (close(in) != 0) {
497 int in = open(MASTER_KEY_FILE, O_RDONLY);
498 if (in == -1) {
505 size_t length = readFully(in, (uint8_t*) &rawBlob, sizeof(rawBlob));
506 if (close(in) != 0) {
848 /* Here is the protocol used in both requests and responses:
850 * where code is one byte long and lengths are unsigned 16-bit integers in
926 * information is defined in global variables, which are set properly before
928 * fixed and defined in a table. If the return value of an action is positive,
1104 * TODO: The abstraction between things stored in hardware and regular blobs