Lines Matching refs:pos
214 bool PrivateKeyInfoCodec::ReadInteger(uint8** pos,
217 return ReadIntegerImpl(pos, end, out, big_endian_);
220 bool PrivateKeyInfoCodec::ReadIntegerWithExpectedSize(uint8** pos,
225 if (!ReadIntegerImpl(pos, end, &temp, true)) // Big-Endian
247 bool PrivateKeyInfoCodec::ReadIntegerImpl(uint8** pos,
252 if (!ReadTypeHeaderAndLength(pos, end, kIntegerTag, &length) || !length)
256 if (**pos == 0x00) {
257 ++(*pos);
262 out->insert(out->end(), *pos, (*pos) + length);
264 (*pos) += length;
319 bool PrivateKeyInfoCodec::ReadLength(uint8** pos, uint8* end, uint32* result) {
320 READ_ASSERT(*pos < end);
324 if (!(**pos & 0x80)) {
325 length = **pos;
326 (*pos)++;
329 int length_of_length = **pos & 0x7F;
331 (*pos)++;
332 READ_ASSERT(*pos + length_of_length < end);
337 length |= **pos;
338 (*pos)++;
342 READ_ASSERT(*pos + length <= end);
347 bool PrivateKeyInfoCodec::ReadTypeHeaderAndLength(uint8** pos,
351 READ_ASSERT(*pos < end);
352 READ_ASSERT(**pos == expected_tag);
353 (*pos)++;
355 return ReadLength(pos, end, length);
358 bool PrivateKeyInfoCodec::ReadSequence(uint8** pos, uint8* end) {
359 return ReadTypeHeaderAndLength(pos, end, kSequenceTag, NULL);
362 bool PrivateKeyInfoCodec::ReadAlgorithmIdentifier(uint8** pos, uint8* end) {
363 READ_ASSERT(*pos + sizeof(kRsaAlgorithmIdentifier) < end);
364 READ_ASSERT(memcmp(*pos, kRsaAlgorithmIdentifier,
366 (*pos) += sizeof(kRsaAlgorithmIdentifier);
370 bool PrivateKeyInfoCodec::ReadVersion(uint8** pos, uint8* end) {
372 if (!ReadTypeHeaderAndLength(pos, end, kIntegerTag, &length))
377 READ_ASSERT(**pos == 0x00);
378 (*pos)++;