Lines Matching +full:p +full:- +full:try
7 # http://www.apache.org/licenses/LICENSE-2.0
10 # distributed under the License is distributed on an "AS-IS" BASIS,
232 context: grpc.ServicerContext) -> testing_api_pb2.ServerInfoResponse:
242 context: grpc.ServicerContext) -> testing_api_pb2.KeysetTemplateResponse:
252 context: grpc.ServicerContext) -> testing_api_pb2.KeysetGenerateResponse:
254 try:
267 context: grpc.ServicerContext) -> testing_api_pb2.KeysetPublicResponse:
268 """Generates a public-key keyset from a private-key keyset."""
269 try:
283 context: grpc.ServicerContext) -> testing_api_pb2.KeysetToJsonResponse:
285 try:
298 context: grpc.ServicerContext) -> testing_api_pb2.KeysetFromJsonResponse:
300 try:
313 ) -> testing_api_pb2.KeysetReadEncryptedResponse:
315 try:
343 ) -> testing_api_pb2.KeysetWriteEncryptedResponse:
345 try:
382 context: grpc.ServicerContext) -> testing_api_pb2.CreationResponse:
384 try:
394 context: grpc.ServicerContext) -> testing_api_pb2.AeadEncryptResponse:
398 p = keyset_handle.primitive(aead.Aead)
399 try:
400 ciphertext = p.encrypt(request.plaintext, request.associated_data)
407 context: grpc.ServicerContext) -> testing_api_pb2.AeadDecryptResponse:
411 p = keyset_handle.primitive(aead.Aead)
412 try:
413 plaintext = p.decrypt(request.ciphertext, request.associated_data)
423 context: grpc.ServicerContext) -> testing_api_pb2.CreationResponse:
425 try:
436 ) -> testing_api_pb2.StreamingAeadEncryptResponse:
438 try:
441 p = keyset_handle.primitive(streaming_aead.StreamingAead)
443 with p.new_encrypting_stream(ciphertext_destination,
454 ) -> testing_api_pb2.StreamingAeadDecryptResponse:
456 try:
459 p = keyset_handle.primitive(streaming_aead.StreamingAead)
461 with p.new_decrypting_stream(stream, request.associated_data) as s:
472 context: grpc.ServicerContext) -> testing_api_pb2.CreationResponse:
474 try:
485 ) -> testing_api_pb2.DeterministicAeadEncryptResponse:
489 p = keyset_handle.primitive(daead.DeterministicAead)
490 try:
491 ciphertext = p.encrypt_deterministically(request.plaintext,
501 ) -> testing_api_pb2.DeterministicAeadDecryptResponse:
505 p = keyset_handle.primitive(daead.DeterministicAead)
506 try:
507 plaintext = p.decrypt_deterministically(request.ciphertext,
519 context: grpc.ServicerContext) -> testing_api_pb2.CreationResponse:
521 try:
531 context: grpc.ServicerContext) -> testing_api_pb2.ComputeMacResponse:
533 try:
536 p = keyset_handle.primitive(mac.Mac)
537 mac_value = p.compute_mac(request.data)
544 context: grpc.ServicerContext) -> testing_api_pb2.VerifyMacResponse:
546 try:
549 p = keyset_handle.primitive(mac.Mac)
550 p.verify_mac(request.mac_value, request.data)
561 context: grpc.ServicerContext) -> testing_api_pb2.CreationResponse:
563 try:
573 context: grpc.ServicerContext) -> testing_api_pb2.CreationResponse:
575 try:
585 context: grpc.ServicerContext) -> testing_api_pb2.HybridEncryptResponse:
587 try:
591 p = public_keyset_handle.primitive(hybrid.HybridEncrypt)
592 ciphertext = p.encrypt(request.plaintext, request.context_info)
599 context: grpc.ServicerContext) -> testing_api_pb2.HybridDecryptResponse:
601 try:
605 p = private_keyset_handle.primitive(hybrid.HybridDecrypt)
606 plaintext = p.decrypt(request.ciphertext, request.context_info)
617 context: grpc.ServicerContext) -> testing_api_pb2.CreationResponse:
619 try:
629 context: grpc.ServicerContext) -> testing_api_pb2.CreationResponse:
631 try:
641 context: grpc.ServicerContext) -> testing_api_pb2.SignatureSignResponse:
643 try:
647 p = private_keyset_handle.primitive(signature.PublicKeySign)
648 signature_value = p.sign(request.data)
655 context: grpc.ServicerContext) -> testing_api_pb2.SignatureVerifyResponse:
657 try:
661 p = public_keyset_handle.primitive(signature.PublicKeyVerify)
662 p.verify(request.signature, request.data)
672 context: grpc.ServicerContext) -> testing_api_pb2.CreationResponse:
674 try:
684 context: grpc.ServicerContext) -> testing_api_pb2.PrfSetKeyIdsResponse:
686 try:
689 p = keyset_handle.primitive(prf.PrfSet)
690 prfs = p.all()
692 response.output.primary_key_id = p.primary_id()
700 context: grpc.ServicerContext) -> testing_api_pb2.PrfSetComputeResponse:
702 try: