Lines Matching refs:available_read
167 if (!data_.write(input.peek_read(), input.available_read())) { in StoreData()
169 input.available_read() + data_.available_read(), EVP_PKEY_size(rsa_key_)); in StoreData()
173 *input_consumed = input.available_read(); in StoreData()
290 if (EVP_DigestSignUpdate(&digest_ctx_, input.peek_read(), input.available_read()) != 1) in Update()
292 *input_consumed = input.available_read(); in Update()
312 assert(padded_len > src.available_read()); in zero_pad_left()
318 size_t padding_len = padded_len - src.available_read(); in zero_pad_left()
320 if (!src.read(dest->get() + padding_len, src.available_read())) in zero_pad_left()
340 if (data_.available_read() > key_len) { in SignUndigested()
342 } else if (data_.available_read() < key_len) { in SignUndigested()
354 if (data_.available_read() + kPkcs1UndigestedSignaturePaddingOverhead > key_len) { in SignUndigested()
356 data_.available_read(), EVP_PKEY_size(rsa_key_) * 8); in SignUndigested()
359 bytes_encrypted = RSA_private_encrypt(data_.available_read(), data_.peek_read(), in SignUndigested()
413 if (EVP_DigestVerifyUpdate(&digest_ctx_, input.peek_read(), input.available_read()) != 1) in Update()
415 *input_consumed = input.available_read(); in Update()
442 if (data_.available_read() > key_len) in VerifyUndigested()
444 if (key_len != signature.available_read()) in VerifyUndigested()
449 if (data_.available_read() + kPkcs1UndigestedSignaturePaddingOverhead > key_len) { in VerifyUndigested()
451 data_.available_read(), key_len * 8); in VerifyUndigested()
463 int bytes_decrypted = RSA_public_decrypt(signature.available_read(), signature.peek_read(), in VerifyUndigested()
471 if (padding_ == KM_PAD_NONE && data_.available_read() < bytes_to_compare) { in VerifyUndigested()
475 const uint8_t* zero_end = compare_pos + bytes_to_compare - data_.available_read(); in VerifyUndigested()
478 bytes_to_compare = data_.available_read(); in VerifyUndigested()
486 if (!EVP_DigestVerifyFinal(&digest_ctx_, signature.peek_read(), signature.available_read())) in VerifyDigested()
552 data_.available_read()) <= 0) in Finish()
559 size_t to_encrypt_len = data_.available_read(); in Finish()
605 data_.available_read()) <= 0) in Finish()
612 size_t to_decrypt_len = data_.available_read(); in Finish()