Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

encryptor lacks sufficient typing #295

Closed

Description

@mikesposito

Currently, the encryptor class variable (and the corresponding constructor option) is typed with any.
As a controller client can inject its own encryptor methods, the minimum encryptor interface needed by the controller should be clear.

Moreover, the solution should take into account that:

  • MetaMask extension and mobile use different encryptors
    • MetaMask extension uses the default encryptor value, provided by KeyringController, which is @metamask/browser-passworder
    • MetaMask mobile injects its own encryptor.
  • When cacheEncryptionKey options is set to true, KeyringController needs an encryptor capable of exporting the encryption key string along with encrypted/decrypted strings. This is only needed by the extension, when using MV3
    • This means that when cacheEncryptionKey is set to true, the encryptor must implement additional methods specific for this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions