aboutsummaryrefslogtreecommitdiff
path: root/xcode/OLMKit/OLMSAS.h
diff options
context:
space:
mode:
authormanuroe <manu@matrix.org>2019-04-08 18:48:09 +0200
committermanuroe <manu@matrix.org>2019-04-10 23:27:00 +0200
commit4057f59453d0276a7dbfeee284892c46786c156b (patch)
tree1f54e8202d6781cba47b771403ae2be6766992b2 /xcode/OLMKit/OLMSAS.h
parent5de295da3e5f9ae7e4de6cfe009e2d0ad4e6a08b (diff)
OLMKit: SAS: Added macLongKdf support
(cherry picked from commit 934d516eb35c488ee197e1bab78a4c81e3c8241d)
Diffstat (limited to 'xcode/OLMKit/OLMSAS.h')
-rw-r--r--xcode/OLMKit/OLMSAS.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/xcode/OLMKit/OLMSAS.h b/xcode/OLMKit/OLMSAS.h
index 454c8e0..3785b03 100644
--- a/xcode/OLMKit/OLMSAS.h
+++ b/xcode/OLMKit/OLMSAS.h
@@ -52,7 +52,18 @@ NS_ASSUME_NONNULL_BEGIN
@param error the error if any.
@return the MAC.
*/
-- (NSString *)calculateMac:(NSString*)input info:(NSString*)info error:(NSError* _Nullable *)error; // TODO: NSError?
+- (NSString *)calculateMac:(NSString*)input info:(NSString*)info error:(NSError* _Nullable *)error;
+
+/**
+ Generate a message authentication code (MAC) based on the shared secret.
+ For compatibility with an old version of olm.js.
+
+ @param input the message to produce the authentication code for.
+ @param info extra information to mix in when generating the MAC, as per the Matrix spec.
+ @param error the error if any.
+ @return the MAC.
+ */
+- (NSString *)calculateMacLongKdf:(NSString*)input info:(NSString*)info error:(NSError* _Nullable *)error;
@end