Lines Matching refs:pos
217 bool PrivateKeyInfoCodec::ReadInteger(uint8** pos,
220 return ReadIntegerImpl(pos, end, out, big_endian_);
223 bool PrivateKeyInfoCodec::ReadIntegerWithExpectedSize(uint8** pos,
228 if (!ReadIntegerImpl(pos, end, &temp, true)) // Big-Endian
253 bool PrivateKeyInfoCodec::ReadIntegerImpl(uint8** pos,
258 if (!ReadTypeHeaderAndLength(pos, end, kIntegerTag, &length) || !length)
262 if (**pos == 0x00) {
263 ++(*pos);
268 out->insert(out->end(), *pos, (*pos) + length);
270 (*pos) += length;
325 bool PrivateKeyInfoCodec::ReadLength(uint8** pos, uint8* end, uint32* result) {
326 READ_ASSERT(*pos < end);
330 if (!(**pos & 0x80)) {
331 length = **pos;
332 (*pos)++;
335 int length_of_length = **pos & 0x7F;
337 (*pos)++;
338 READ_ASSERT(*pos + length_of_length < end);
343 length |= **pos;
344 (*pos)++;
348 READ_ASSERT(*pos + length <= end);
353 bool PrivateKeyInfoCodec::ReadTypeHeaderAndLength(uint8** pos,
357 READ_ASSERT(*pos < end);
358 READ_ASSERT(**pos == expected_tag);
359 (*pos)++;
361 return ReadLength(pos, end, length);
364 bool PrivateKeyInfoCodec::ReadSequence(uint8** pos, uint8* end) {
365 return ReadTypeHeaderAndLength(pos, end, kSequenceTag, NULL);
368 bool PrivateKeyInfoCodec::ReadAlgorithmIdentifier(uint8** pos, uint8* end) {
369 READ_ASSERT(*pos + sizeof(kRsaAlgorithmIdentifier) < end);
370 READ_ASSERT(memcmp(*pos, kRsaAlgorithmIdentifier,
372 (*pos) += sizeof(kRsaAlgorithmIdentifier);
376 bool PrivateKeyInfoCodec::ReadVersion(uint8** pos, uint8* end) {
378 if (!ReadTypeHeaderAndLength(pos, end, kIntegerTag, &length))
383 READ_ASSERT(**pos == 0x00);
384 (*pos)++;