mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-26 21:20:43 +00:00

git-subtree-dir: submodules/TelegramCore git-subtree-mainline: 971273e8f8f49a47f14b251d2f35e3445a61fc3f git-subtree-split: 9561227540acef69894e6546395ab223a6233600
23 lines
650 B
Objective-C
23 lines
650 B
Objective-C
#ifndef __CRYPTO_H_
|
|
#define __CRYPTO_H_
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
NSData * _Nonnull CryptoMD5(const void *bytes, int count);
|
|
NSData * _Nonnull CryptoSHA1(const void *bytes, int count);
|
|
NSData * _Nonnull CryptoSHA256(const void *bytes, int count);
|
|
NSData * _Nonnull CryptoSHA512(const void *bytes, int count);
|
|
|
|
@interface IncrementalMD5 : NSObject
|
|
|
|
- (instancetype _Nonnull)init;
|
|
- (void)update:(NSData * _Nonnull)data;
|
|
- (void)update:(const void * _Nonnull)bytes count:(int)count;
|
|
- (NSData * _Nonnull)complete;
|
|
|
|
@end
|
|
|
|
NSData * _Nullable CryptoAES(bool encrypt, NSData * _Nonnull key, NSData * _Nonnull iv, NSData * _Nonnull data);
|
|
|
|
#endif
|