forgerock-core
4.4.0
forgerock-core
/
org.forgerock.android.auth
/
SecuredSharedPreferences
Secured
Shared
Preferences
open
class
SecuredSharedPreferences
:
SharedPreferences
An implementation of
SharedPreferences
that encrypts values.
Members
Constructors
Secured
Shared
Preferences
Link copied to clipboard
constructor
(
context
:
Context
,
fileName
:
String
,
keyAlias
:
String
)
constructor
(
context
:
Context
,
fileName
:
String
,
keyAlias
:
String
,
encryptor
:
Encryptor
)
Types
Editor
Link copied to clipboard
private
class
Editor
:
SharedPreferences.Editor
Properties
BOOLEAN_TYPE
Link copied to clipboard
private
val
BOOLEAN_TYPE
:
Int
=
5
encryptor
Link copied to clipboard
private
val
encryptor
:
Encryptor
FLOAT_TYPE
Link copied to clipboard
private
val
FLOAT_TYPE
:
Int
=
4
INT_TYPE
Link copied to clipboard
private
val
INT_TYPE
:
Int
=
2
key
Alias
Link copied to clipboard
private
val
keyAlias
:
String
listeners
Link copied to clipboard
private
val
listeners
:
List
<
SharedPreferences.OnSharedPreferenceChangeListener
>
LONG_TYPE
Link copied to clipboard
private
val
LONG_TYPE
:
Int
=
3
shared
Preferences
Link copied to clipboard
private
val
sharedPreferences
:
SharedPreferences
STRING_SET_TYPE
Link copied to clipboard
private
val
STRING_SET_TYPE
:
Int
=
1
STRING_TYPE
Link copied to clipboard
private
val
STRING_TYPE
:
Int
=
0
TAG
Link copied to clipboard
val
TAG
:
String
TYPE
Link copied to clipboard
private
val
TYPE
:
String
=
"type"
VALUE
Link copied to clipboard
val
VALUE
:
String
=
"value"
Functions
contains
Link copied to clipboard
open
fun
contains
(
@
NonNull
key
:
String
)
:
Boolean
decrypt
Link copied to clipboard
private
open
fun
decrypt
(
@
NonNull
data
:
String
)
:
String
edit
Link copied to clipboard
@
NonNull
open
fun
edit
(
)
:
SharedPreferences.Editor
encrypt
Link copied to clipboard
private
open
fun
encrypt
(
value
:
Array
<
Byte
>
,
retry
:
Boolean
)
:
String
get
Link copied to clipboard
private
open
fun
get
(
key
:
String
)
:
Any
private
open
fun
get
(
@
NonNull
key
:
String
,
retry
:
Boolean
)
:
Any
get
All
Link copied to clipboard
@
NonNull
open
fun
getAll
(
)
:
Map
<
String
,
out
Any
>
get
Boolean
Link copied to clipboard
open
fun
getBoolean
(
@
NonNull
key
:
String
,
defValue
:
Boolean
)
:
Boolean
get
Float
Link copied to clipboard
open
fun
getFloat
(
@
NonNull
key
:
String
,
defValue
:
Float
)
:
Float
get
Int
Link copied to clipboard
open
fun
getInt
(
@
NonNull
key
:
String
,
defValue
:
Int
)
:
Int
get
Long
Link copied to clipboard
open
fun
getLong
(
@
NonNull
key
:
String
,
defValue
:
Long
)
:
Long
get
String
Link copied to clipboard
@
Nullable
open
fun
getString
(
@
Nullable
key
:
String
,
@
Nullable
defValue
:
String
)
:
String
get
String
Set
Link copied to clipboard
@
Nullable
open
fun
getStringSet
(
@
NonNull
key
:
String
,
@
Nullable
defValues
:
Set
<
String
>
)
:
Set
<
String
>
is
Key
Alias
Link copied to clipboard
private
open
fun
isKeyAlias
(
key
:
String
)
:
Boolean
keys
Link copied to clipboard
private
open
fun
keys
(
)
:
Set
<
String
>
register
On
Shared
Preference
Change
Listener
Link copied to clipboard
open
fun
registerOnSharedPreferenceChangeListener
(
@
NonNull
listener
:
SharedPreferences.OnSharedPreferenceChangeListener
)
unregister
On
Shared
Preference
Change
Listener
Link copied to clipboard
open
fun
unregisterOnSharedPreferenceChangeListener
(
@
NonNull
listener
:
SharedPreferences.OnSharedPreferenceChangeListener
)