-
-
Notifications
You must be signed in to change notification settings - Fork 16
.safeget
localDataStorage.safeget( keyName, [user scramble key] )
This method restores the obfuscated value stored under keyName returning the original value and data type. (If an Array was stored then an Array would be returned.) A user scramble key is optional, but if one were used to safeset the key, it must be supplied in order to retrieve the original value. When omitted, the global scramble key will be transparently used.
EXAMPLES:
● localData.safeget( 'safeKey1', [123456] ) --> 'obfuscated data here'
● localData.safeget( 'safeKey2', 'my secret scramble key' ) --> 99.97
● localData.safeget( 'safeKey3', 6977221 ) --> Fri May 19 2017 10:04:17 GMT-0400 (Eastern Daylight Time)
● localData.safeget( 'safeKey4', {'a':['1']} ) --> true
Obviously, if you call safeget on an obfuscated key and supply the wrong scramble key then the returned value will be incorrect.
✨ The complement to this is safeset.
📝 NOTE: There is nothing to prevent you from safesetting a key and then, inadvertently or otherwise, retrieving the value with a method other than safeget. For instance, calling get on a key that was created using safeset will simply return the obfuscated value (not the original protected value).
Array Keys:
push / pull, pullall poke contains where
Broadcasting:
broadcast
Data Transfer:
import / export
Duplicates:
countdupes, showdupes, listdupes
Internals:
cancrunch crunch / uncrunch
shufflestring / unshufflestring
Management:
keys
Memory Consumption:
Memory Quota:
showquota
Query:
haskey, hasval, hastype
setscramblekey / getscramblekey
Type Check:
isarray isbigint isboolean iscrunch
isdate isfloat isinteger isnull
Utility:
chopget copy softset rename
_set / _get _clear _key _remove
Management:
_keys
Type Check:
_isarray _isbigint _isboolean _iscrunch