123456789101112131415161718192021222324 |
- //
- // Created by miti on 2019-12-28.
- //
- #ifndef APACHE_PHP_EXTENSION_POSTLAMESSAGING_H
- #define APACHE_PHP_EXTENSION_POSTLAMESSAGING_H
- #include "ProtobufMessageRW.h"
- #include <string>
- #include <vector>
- class PostLAMessaging {
- uint8_t key[16];
- ProtobufMessageRW protobufReaderWriter;
- uint32_t aes_gcm_wrapper(int enc, uint8_t* plaintext, uint32_t plaintext_length, uint8_t* ciphertext, uint32_t* ciphertext_length);
- uint32_t encrypt_decrypt_msgs(int encrypt_decrypt, std::vector<std::string> &input_msgs,
- std::vector<std::string> &output_msgs);
- public:
- void set_la_symmetric_key(uint8_t* given_key);
- void set_fd(int given_fd);
- uint32_t receive_secure_msg(std::string& output_msg);
- uint32_t receive_secure_msgs(std::vector<std::string>& output_msgs);
- uint32_t send_secure_msgs(std::vector<std::string>& input_msgs);
- };
- #endif //APACHE_PHP_EXTENSION_POSTLAMESSAGING_H
|