Store cached version of keystore cryptographer
For decryption and encryption of |keystore_decryptor_token| we need a special version of cryptographer, which contains only keystore keys and uses last keystore key as the default encryption key. To avoid heavy creation of keystore cryptographer and simplify some future error handling (crypto errors, which don't allow to create keystore cryptographer), we now maintain its cached version inside NigoriState. It's implemented as KeystoreKeysCryptographer, which wraps CryptographerImpl and provides interface specific for encryption and decryption of |keystore_decryptor_token|. Keystore keys now stored inside KeystoreKeysCryptographer. Bug: 922900 Change-Id: I905bd351f99704c07419a815c59ae7efa7b119f3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1865309 Commit-Queue: Maksim Moskvitin <mmoskvitin@google.com> Reviewed-by:Mikel Astiz <mastiz@chromium.org> Auto-Submit: Maksim Moskvitin <mmoskvitin@google.com> Cr-Commit-Position: refs/heads/master@{#706895}
Showing
Please register or sign in to comment