Deprecate storageServiceKey in SyncMessage.Keys

This commit is contained in:
Fedor Indutny 2023-10-12 21:42:24 +02:00 committed by GitHub
parent 37b3a6de4b
commit d7b53f3d27
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 62 additions and 26 deletions

View file

@ -127,6 +127,10 @@ export function decryptDeviceName(
return Bytes.toString(plaintext);
}
export function deriveStorageServiceKey(masterKey: Uint8Array): Uint8Array {
return hmacSha256(masterKey, Bytes.fromString('Storage Service Encryption'));
}
export function deriveStorageManifestKey(
storageServiceKey: Uint8Array,
version: Long = Long.fromNumber(0)