Bug 1842773 - Part 5: Add ArrayBuffer.prototype.{maxByteLength,resizable} getters...
[gecko.git] / dom / indexedDB / IndexedDBCipherKeyManager.h
blobac46cb888061aa826a937e212e523e9f023b6669
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef DOM_INDEXEDDB_INDEXEDDBCIPHERKEYMANAGER_H_
8 #define DOM_INDEXEDDB_INDEXEDDBCIPHERKEYMANAGER_H_
10 #include "mozilla/dom/quota/CipherKeyManager.h"
11 #include "mozilla/dom/quota/IPCStreamCipherStrategy.h"
13 namespace mozilla::dom {
15 // IndexedDBCipherKeyManager is used by IndexedDB operations to store/retrieve
16 // keys in private browsing mode. All data in IndexedDB must be encrypted
17 // using a cipher key and unique IV (Initialization Vector). While there's a
18 // separate cipher key for every blob file; the SQLite database gets encrypted
19 // using the commmon database key. All keys pertaining to a single IndexedDB
20 // database get stored together using quota::CipherKeyManager. So, the hashmap
21 // can be used to look up the common database key and blob keys using "default"
22 // and blob file ids respectively.
24 using IndexedDBCipherStrategy = mozilla::dom::quota::IPCStreamCipherStrategy;
25 using IndexedDBCipherKeyManager =
26 mozilla::dom::quota::CipherKeyManager<IndexedDBCipherStrategy>;
27 using CipherKey = IndexedDBCipherStrategy::KeyType;
29 } // namespace mozilla::dom
31 #endif // DOM_INDEXEDDB_INDEXEDDBCIPHERKEYMANAGER_H_