mirror of
https://github.com/DrKLO/Telegram.git
synced 2024-12-23 15:00:50 +01:00
23 lines
569 B
C++
23 lines
569 B
C++
#ifndef TGCALLS_SIGNALING_ENCRYPTION_H
|
|
#define TGCALLS_SIGNALING_ENCRYPTION_H
|
|
|
|
#include "Instance.h"
|
|
#include "EncryptedConnection.h"
|
|
|
|
namespace tgcalls {
|
|
|
|
class SignalingEncryption {
|
|
public:
|
|
SignalingEncryption(EncryptionKey const &encryptionKey);
|
|
~SignalingEncryption();
|
|
|
|
absl::optional<rtc::CopyOnWriteBuffer> encryptOutgoing(std::vector<uint8_t> const &data);
|
|
absl::optional<rtc::CopyOnWriteBuffer> decryptIncoming(std::vector<uint8_t> const &data);
|
|
|
|
private:
|
|
std::unique_ptr<EncryptedConnection> _connection;
|
|
};
|
|
|
|
} // namespace tgcalls
|
|
|
|
#endif
|