-
-
Notifications
You must be signed in to change notification settings - Fork 16
._safeset
localDataStorage._safeset( keyName, value, [user scramble key] )
This method stores value under keyName, creating a new key if necessary, where the key prefix is prepended to keyName, and value is stored obfuscated. A user scramble key is optional, and if omitted, the global scramble key will be used.
This will overwrite an existing value for keyName. When this happens, the prior value cannot be retrieved.
While value is obscured, it is not encrypted. This means, for example, that value is not padded to a certain amount to disguise its true length.
Scramble keys (user or global) may be set to any data type, just the same as value.
EXAMPLES:
- localData._safeset( 'safeMemKey1', 'my obfuscated data', 123456 )
- localData._safeset( 'safeMemKey2', .007, 'my secret scramble key' )
- localData._safeset( 'safeMemKey3', new Date(), 'BR549' )
- localData._safeset( 'safeMemKey4', true, {'z':['10']} )
✨ The complement to this is _safeget.
🛢 The corresponding disk-based method is safeset.
📝 NOTE: To examine the obfuscated data internally, retrieve keyName with _get.
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