-
-
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 Object was stored then an Object 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._safeset( 'safeMemKey1', 123456 ) --> 'my obfuscated data'
- localData._safeset( 'safeMemKey2', 'my secret scramble key' ) --> .007
- localData._safeset( 'safeMemKey3', 'BR549' ) --> Sun Oct 24 2022 19:34:31 GMT-0500 (Eastern Standard Time)
- localData._safeset( 'safeMemKey4', {'z':['10']} ) --> 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.
🛢 The corresponding disk-based method is safeget.
📝 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