diff --git a/lib/shared/crypto-utils.js b/lib/shared/crypto-utils.js new file mode 100644 --- /dev/null +++ b/lib/shared/crypto-utils.js @@ -0,0 +1,13 @@ +//@flow + +import type { OLMOneTimeKeys } from '../types/crypto-types'; +import { values } from '../utils/objects.js'; + +function getOneTimeKeyValues( + oneTimeKeys: OLMOneTimeKeys, +): $ReadOnlyArray { + const keys: $ReadOnlyArray = values(oneTimeKeys.curve25519); + return keys; +} + +export { getOneTimeKeyValues };