Skip to content

CryptoKey objects are deeply mutable #62972

@ChALkeR

Description

@ChALkeR
> cryptoKey
CryptoKey {
  type: 'secret',
  extractable: true,
  algorithm: { name: 'AES-GCM', length: 256 },
  usages: [ 'encrypt', 'decrypt', 'encrypt' ]
}
> cryptoKey.algorithm.length = 128
> cryptoKey.algorithm.name = 'FooBar'
> cryptoKey.algorithm.x = 10
> cryptoKey.algorithm
{ name: 'FooBar', length: 128, x: 10 }

Same with usages:

> cryptoKey.usages.push('foo')
4
> cryptoKey.usages
[ 'encrypt', 'decrypt', 'encrypt', 'foo' ]

(again, auto-detected by the scanner behind @deepview-autofix)

Metadata

Metadata

Assignees

No one assigned

    Labels

    cryptoIssues and PRs related to the crypto subsystem.webcrypto

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions