Files
ichmagmaus111andClaude Opus 5.5 0622057a4f Ghostgram: open-source release
Ghostgram for iOS, rebuilt from scratch on Telegram iOS 13.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 17:57:09 +01:00

22 lines
620 B
Objective-C

#import <MtProtoKit/MTQuickAck.h>
#import <libkern/OSByteOrder.h>
static const uint32_t MTQuickAckFlagBit = 0x80000000u;
int32_t MTQuickAckTokenFromMsgKeyLarge(const uint8_t *msgKeyLarge) {
uint32_t token = 0;
memcpy(&token, msgKeyLarge, 4);
return (int32_t)(token & ~MTQuickAckFlagBit);
}
int32_t MTQuickAckTokenFromIntermediateWord(int32_t word) {
return (int32_t)(((uint32_t)word) & ~MTQuickAckFlagBit);
}
int32_t MTQuickAckTokenFromAbridgedBytes(const uint8_t *bytes) {
uint32_t swapped = 0;
memcpy(&swapped, bytes, 4);
return (int32_t)(OSSwapInt32(swapped) & ~MTQuickAckFlagBit);
}