-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor AESCryptoModule and CommExpoPackage so that AES stack is ava…
…ilable in NSE Summary: This differential implements Objective C compatibility class for AESCryptoModule that internally calls the same functionality as AESCryptoModule expo module. It also introduces necessary refactors and build config files changes so that we can use Compatibility class from any pure Objective C place like NSE. Test Plan: 1. Change NSE code according to: https://gist.github.com/marcinwasowicz/442f91ecb3e9781ab4e6e997692e3a46 (literally copy paste). 2. Send notification to the app running on physical device. 3. Examine NSE logs in console app. Reviewers: bartek Reviewed By: bartek Subscribers: ashoat, tomek Differential Revision: https://phab.comm.dev/D8424
- Loading branch information
1 parent
8dd1906
commit fd2781d
Showing
5 changed files
with
132 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
native/ios/Comm/CommAESCryptoUtils/AESCryptoModuleObjCCompat.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#import <Foundation/Foundation.h> | ||
|
||
@interface AESCryptoModuleObjCCompat : NSObject | ||
- (BOOL)generateKey:(NSMutableData *_Nonnull)destination | ||
withError:(NSError *_Nullable *_Nullable)error; | ||
- (NSInteger)encryptedLength:(NSData *_Nonnull)plaintext; | ||
- (BOOL)encryptWithKey:(NSData *_Nonnull)rawKey | ||
plaintext:(NSData *_Nonnull)plaintext | ||
destination:(NSMutableData *_Nonnull)destination | ||
withError:(NSError *_Nullable *_Nullable)error; | ||
- (NSInteger)decryptedLength:(NSData *_Nonnull)sealedData; | ||
- (BOOL)decryptWithKey:(NSData *_Nonnull)rawKey | ||
sealedData:(NSData *_Nonnull)sealedData | ||
destination:(NSMutableData *_Nonnull)destination | ||
withError:(NSError *_Nullable *_Nullable)error; | ||
- (nonnull instancetype)init; | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters