Deprecate storageServiceKey in SyncMessage.Keys

Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
automated-signal
2023-10-16 13:18:04 -07:00
committed by GitHub
parent 32046c0d19
commit bda5a9c0be
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)