Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stores: Remove StoreCipher::{en,de}crypt_value_[base64_]typed #3638

Merged
merged 6 commits into from
Jul 3, 2024

Commits on Jul 2, 2024

  1. Use IndexeddbSerializer more widely in test code

    reuse `IndexeddbSerializer::maybe_encrypt_value` instead of re-inventing it.
    richvdh committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    c3e4cc7 View commit details
    Browse the repository at this point in the history
  2. Rewrite StoreCipher::decrypt_value_base64_typed

    Instead of un-base64-ing and calling `decrypt_value_typed` (which deserializes
    the result`), call `decrypt_value_base64_data` (which un-base64s before
    decrypting but does not deserialize the result), then deserialize.
    
    This makes it more symmetrical with `encrypt_value_base64_typed`, and helps me
    get rid of `decrypt_value_typed` (which is barely used.)
    richvdh committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    ed5945c View commit details
    Browse the repository at this point in the history
  3. Fix docs on StoreCipher::encrypt_value_base64_typed

    looks like they got C&Ped from `encrypt_value_typed`.
    richvdh committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    a3545d1 View commit details
    Browse the repository at this point in the history
  4. Inline StoreCipher::{encrypt,decrypt}_value_typed

    Each of these are quite simple, are only used in two places, and their
    existence melts my brain.
    richvdh committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    dec8947 View commit details
    Browse the repository at this point in the history
  5. Rewrite IndexeddbSerializer::maybe_{encrypt,decrypt}_value

    ... to use `en/decrypt_value_base64_data` instead of
    `en/decrypt_value_base64_typed`.
    
    We have to have the de/serialization code for the unencrypted case anyway, so
    using the higher-level method isn't helping us much.
    richvdh committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    37d232e View commit details
    Browse the repository at this point in the history
  6. Remove unused StoreCipher::{en,de}crypt_value_base64_typed

    Outside of tests, these things are totally unused.
    richvdh committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    f8761de View commit details
    Browse the repository at this point in the history