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