The goog.storage.EncryptedStorage Class

goog.storage.EncryptedStorage
> goog.storage.CollectableStorage
> goog.storage.ExpiringStorage
> goog.storage.RichStorage
> goog.storage.Storage

goog.storage.EncryptedStorage(mechanism, secret)

Provides an encrypted storage. The keys are hashed with a secret, so their existence cannot be verified without the knowledge of the secret. The values are encrypted using the key, a salt, and the secret, so stream cipher initialization varies for each stored value.

mechanism {!goog.storage.mechanism.IterableMechanism}
The underlying storage mechanism.
secret {string}
The secret key used to encrypt the storage.

.collect(opt_strict)

Inherited from goog.storage.CollectableStorage .

Cleans up the storage by removing expired keys.

opt_strict {boolean=}
Also remove invalid keys.

.get(key)

Inherited from goog.storage.RichStorage .

Get an item from the data storage.

key {string}
The key to get.
returns {*}
Deserialized value or undefined if not found.

.getWrapper()

.remove()

.set()