mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Extract mtproto key generation code.
This commit is contained in:
@@ -12,6 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "mtproto/connection_resolving.h"
|
||||
#include "mtproto/session.h"
|
||||
#include "base/unixtime.h"
|
||||
#include "base/openssl_help.h"
|
||||
|
||||
namespace MTP {
|
||||
namespace internal {
|
||||
@@ -187,5 +188,11 @@ ConnectionPointer AbstractConnection::Create(
|
||||
return result;
|
||||
}
|
||||
|
||||
uint32 AbstractConnection::extendedNotSecurePadding() const {
|
||||
return requiresExtendedPadding()
|
||||
? uint32(openssl::RandomValue<uchar>() & 0x3F)
|
||||
: 0;
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
} // namespace MTP
|
||||
|
||||
Reference in New Issue
Block a user