File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -23,11 +23,13 @@ export function decodeEncryptionContextFactory(
23
23
* Exported for testing. Used by deserializeMessageHeader to compose a complete solution.
24
24
* @param encodedEncryptionContext Uint8Array
25
25
*/
26
- function decodeEncryptionContext ( encodedEncryptionContext : Uint8Array ) {
26
+ function decodeEncryptionContext (
27
+ encodedEncryptionContext : Uint8Array
28
+ ) : Readonly < EncryptionContext > {
27
29
const encryptionContext : EncryptionContext = Object . create ( null )
28
30
/* Check for early return (Postcondition): The case of 0 length is defined as an empty object. */
29
31
if ( ! encodedEncryptionContext . byteLength ) {
30
- return encryptionContext
32
+ return Object . freeze ( encryptionContext )
31
33
}
32
34
/* Uint8Array is a view on top of the underlying ArrayBuffer.
33
35
* This means that raw underlying memory stored in the ArrayBuffer
You can’t perform that action at this time.
0 commit comments