Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3530728
D10368.id34780.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
949 B
Referenced Files
None
Subscribers
None
D10368.id34780.diff
View Options
diff --git a/lib/shared/crypto-utils.js b/lib/shared/crypto-utils.js
--- a/lib/shared/crypto-utils.js
+++ b/lib/shared/crypto-utils.js
@@ -20,7 +20,7 @@
CallServerEndpointOptions,
CallServerEndpoint,
} from '../utils/call-server-endpoint.js';
-import { values } from '../utils/objects.js';
+import { values, entries } from '../utils/objects.js';
export type InitialNotifMessageOptions = {
+callServerEndpoint?: ?CallServerEndpoint,
@@ -98,6 +98,14 @@
return getPrekeyValue(prekey);
}
+function getOneTimeKeyArray(
+ oneTimeKeys: OLMOneTimeKeys,
+): $ReadOnlyArray<string> {
+ return entries(oneTimeKeys.curve25519).map(([key, value]: [string, string]) =>
+ JSON.stringify({ curve25519: { [key]: value } }),
+ );
+}
+
export {
getOneTimeKeyValues,
getPrekeyValue,
@@ -105,4 +113,5 @@
getPrekeyValueFromBlob,
initialEncryptedMessageContent,
useInitialNotificationsEncryptedMessage,
+ getOneTimeKeyArray,
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 26, 4:12 AM (7 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2703798
Default Alt Text
D10368.id34780.diff (949 B)
Attached To
Mode
D10368: [lib] add method to parse one-time keys
Attached
Detach File
Event Timeline
Log In to Comment