DecryptorWrapper.cpp 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #include <stdint.h>
  2. #include "Decryptor.h"
  3. #include "Decryptor_t.h"
  4. uint32_t process_apache_message_generate_response_wrapper(uint8_t* input_ciphertext, uint32_t input_ciphertext_plus_tag_length, uint8_t* output_ciphertext, uint32_t* output_ciphertext_plus_tag_length)
  5. {
  6. return Decryptor::process_apache_message_generate_response(input_ciphertext, input_ciphertext_plus_tag_length, output_ciphertext, output_ciphertext_plus_tag_length);
  7. }
  8. uint32_t process_verifiers_message_wrapper(uint8_t* input_ciphertext)
  9. {
  10. return Decryptor::process_verifiers_message(input_ciphertext);
  11. }
  12. uint32_t create_and_encrypt_mitigator_header_H_wrapper(uint8_t* ciphertext_token_H_plus_tag)
  13. {
  14. return Decryptor::create_and_encrypt_mitigator_header_H(ciphertext_token_H_plus_tag);
  15. }
  16. void calculate_sealed_keypair_size_wrapper(uint32_t* length)
  17. {
  18. Decryptor::calculate_sealed_keypair_size(length);
  19. }
  20. uint32_t create_and_seal_long_term_signing_key_pair_wrapper(uint32_t* sealed_data_length, uint8_t* sealed_data)
  21. {
  22. return Decryptor::create_and_seal_long_term_signing_key_pair(sealed_data_length, sealed_data);
  23. }
  24. uint32_t unseal_and_restore_long_term_signing_key_pair_wrapper(uint8_t* sealed_data, uint32_t* sgx_sealed_data_length)
  25. {
  26. return Decryptor::unseal_and_restore_long_term_signing_key_pair(sealed_data, sgx_sealed_data_length);
  27. }
  28. void get_verifier_mrenclave_apache_mrsigner_wrapper(uint8_t* output)
  29. {
  30. Decryptor::testing_get_verifier_mrenclave_apache_mrsigner(output);
  31. }
  32. void get_short_term_public_key_wrapper(uint8_t* output)
  33. {
  34. Decryptor::testing_get_short_term_public_key(output);
  35. }
  36. void get_long_term_verification_key_wrapper(uint8_t* output)
  37. {
  38. Decryptor::testing_long_term_verification_key(output);
  39. }