- Preparing search index...
- The search index is not available
LDesign 基础库
Constructors
constructor
- new LocalStorageUtil(storage?, key?, publicKey?, privateKey?): LocalStorageUtil
-
Parameters
-
Optional storage: Storage
-
Optional key: string
-
Optional publicKey: string
-
Optional privateKey: string
Properties
Private Optional key
key?: string
Private Optional privateKey
privateKey?: string
Private Optional publicKey
publicKey?: string
Private storage
storage: Storage
Methods
clear
- clear(): void
-
Returns void
Private decrypt
- decrypt(encryptedData): string
-
Returns string
Private encrypt
- encrypt(data): string
-
Returns string
getItem
- getItem<T>(key): null | T
-
Returns null | T
removeItem
- removeItem(key): void
-
Returns void
setItem
- setItem<T>(key, value): void
-
Returns void
Static clear
- clear(storage?, key?): void
-
Parameters
-
Optional storage: Storage
-
Optional key: string
Returns void
Static getItem
- getItem<T>(key, privateKey, storage?): null | T
-
Parameters
-
key: string
-
privateKey: string
-
Optional storage: Storage
Returns null | T
Static removeItem
- removeItem(key, storage?): void
-
Parameters
-
key: string
-
Optional storage: Storage
Returns void
Static setItem
- setItem<T>(key, value, publicKey, storage?): void
-
Parameters
-
key: string
-
value: T
-
publicKey: string
-
Optional storage: Storage
Returns void