diff options
author | Chris Ballinger <chrisballinger@gmail.com> | 2016-04-09 14:00:30 -0700 |
---|---|---|
committer | Chris Ballinger <chrisballinger@gmail.com> | 2016-04-09 14:00:30 -0700 |
commit | f505113fb7a6d61015ad8050b3fb4e26df029150 (patch) | |
tree | 0bdaba8f07189f3adc828c2895ce7429d9b3cb3e /xcode/OLMKit/OLMSession.h | |
parent | 719eb543a8d08c4f536ea7933ffb3af0a8553e87 (diff) |
Initial test passing
Diffstat (limited to 'xcode/OLMKit/OLMSession.h')
-rw-r--r-- | xcode/OLMKit/OLMSession.h | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/xcode/OLMKit/OLMSession.h b/xcode/OLMKit/OLMSession.h index 196900f..1a075e4 100644 --- a/xcode/OLMKit/OLMSession.h +++ b/xcode/OLMKit/OLMSession.h @@ -9,21 +9,30 @@ #import <Foundation/Foundation.h> #import "OLMSerializable.h" #import "OLMAccount.h" +#import "OLMMessage.h" @interface OLMSession : NSObject <OLMSerializable> -- (instancetype) initOutboundSessionWithAccount:(OLMAccount*)account theirIdentityKey:(NSData*)theirIdentityKey theirOneTimeKey:(NSData*)theirOneTimeKey; +@property (nonatomic, strong) OLMAccount *account; -- (instancetype) initInboundSessionWithAccount:(OLMAccount*)account oneTimeKeyMessage:(NSData*)oneTimeKeyMessage; +- (instancetype) initOutboundSessionWithAccount:(OLMAccount*)account theirIdentityKey:(NSString*)theirIdentityKey theirOneTimeKey:(NSString*)theirOneTimeKey; -- (instancetype) initInboundSessionWithAccount:(OLMAccount*)account theirIdentityKey:(NSData*)theirIdentityKey oneTimeKeyMessage:(NSData*)oneTimeKeyMessage; +- (instancetype) initInboundSessionWithAccount:(OLMAccount*)account oneTimeKeyMessage:(NSString*)oneTimeKeyMessage; -- (NSData*) sessionIdentifier; +- (instancetype) initInboundSessionWithAccount:(OLMAccount*)account theirIdentityKey:(NSString*)theirIdentityKey oneTimeKeyMessage:(NSString*)oneTimeKeyMessage; -- (BOOL) matchesInboundSession:(NSData*)oneTimeKeyMessage; +- (NSString*) sessionIdentifier; -- (BOOL) matchesInboundSessionFrom:(NSData*)theirIdentityKey oneTimeKeyMessage:(NSData *)oneTimeKeyMessage; +- (BOOL) matchesInboundSession:(NSString*)oneTimeKeyMessage; -- (void) removeOneTimeKeys; +- (BOOL) matchesInboundSessionFrom:(NSString*)theirIdentityKey oneTimeKeyMessage:(NSString *)oneTimeKeyMessage; + +- (BOOL) removeOneTimeKeys; + +/** UTF-8 plaintext -> base64 ciphertext */ +- (OLMMessage*) encryptMessage:(NSString*)message; + +/** base64 ciphertext -> UTF-8 plaintext */ +- (NSString*) decryptMessage:(OLMMessage*)message; @end |