Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3351259
D10368.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.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
Sun, Nov 24, 12:43 AM (20 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2573297
Default Alt Text
D10368.diff (949 B)
Attached To
Mode
D10368: [lib] add method to parse one-time keys
Attached
Detach File
Event Timeline
Log In to Comment