#define OLM_IDENTITY_KEYS_JSON_SIZE 128\r
#define DEVICE_KEY_SIZE 44\r
#define SIGNING_KEY_SIZE 44\r
+#define ONETIME_KEY_SIZE 44\r
\r
#define KEY_SHARE_EVENT_LEN 1024\r
\r
\r
#define OLM_SESSION_MEMORY_SIZE 3352\r
#define OLM_ENCRYPT_RANDOM_SIZE 32\r
+#define OLM_OUTBOUND_SESSION_RANDOM_SIZE (32*2)\r
\r
-#define OLM_ONETIME_KEYS_RANDOM_SIZE 32*10\r
+#define OLM_ONETIME_KEYS_RANDOM_SIZE (32*10)\r
#define OLM_KEY_ID_SIZE 32\r
\r
#define OLM_SIGNATURE_SIZE 128\r
\r
bool\r
JsonEscape(\r
- char * sIn, int sInLen,\r
+ const char * sIn, int sInLen,\r
char * sOut, int sOutCap);\r
\r
bool JsonSign(\r
- char * sIn, int sInLen,\r
+ const char * sIn, int sInLen,\r
char * sOut, int sOutCap);\r
\r
// Matrix Device\r
} MatrixOlmSession;\r
\r
bool\r
-MatrixOlmSessionInit(\r
+MatrixOlmSessionTo(\r
MatrixOlmSession * session,\r
- const char * deviceId);\r
+ OlmAccount * olmAccount,\r
+ const char * deviceId,\r
+ const char * deviceKey,\r
+ const char * deviceOnetimeKey);\r
\r
bool\r
MatrixOlmSessionEncrypt(\r
MatrixClientUploadDeviceKeys(\r
MatrixClient * client);\r
\r
+bool\r
+MatrixClientClaimOnetimeKey(\r
+ MatrixClient * client,\r
+ const char * userId,\r
+ const char * deviceId,\r
+ char * outOnetimeKey, int outOnetimeKeyCap);\r
+\r
bool\r
MatrixClientLoginPassword(\r
MatrixClient * client,\r
bool\r
MatrixClientSync(\r
MatrixClient * client,\r
- char * outSyncBuffer, int outSyncCap);\r
+ char * outSync, int outSyncCap);\r
\r
bool\r
MatrixClientShareMegolmOutSession(\r
MatrixClient * client,\r
+ const char * userId,\r
const char * deviceId,\r
MatrixMegolmOutSession * session);\r
\r
bool\r
MatrixClientGetOlmSession(\r
MatrixClient * client,\r
+ const char * userId,\r
const char * deviceId,\r
MatrixOlmSession ** outSession);\r
\r