Products · Dash API
Secrets
Keep small private values, such as a session token, encrypted on the phone.
A dot's secrets, such as tokens its own API gives the person. Holds up to 32 strings of up to 4 KB each, encrypted with a key that never leaves the device. Don't keep the dot's own API keys here: they would ship in its bundle, which anyone can read.
dash.storage.secret.get
dash.storage.secret.get(key: string, callOptions?: CallOptions): DashRequest<string | null>The secret saved under key, or null if there isn't one.
dash.storage.secret.set
dash.storage.secret.set(key: string, value: string, callOptions?: CallOptions): DashRequest<void>Saves value under key, encrypted on the phone.
dash.storage.secret.remove
dash.storage.secret.remove(key: string, callOptions?: CallOptions): DashRequest<void>Deletes the secret saved under key. Deleting one that isn't there is fine.
dash.storage.secret.clear
dash.storage.secret.clear(callOptions?: CallOptions): DashRequest<void>Deletes all of the dot's secrets.
Keep reading
CryptoWork out hashes and HMAC signatures, and make random bytes and UUIDs.UtilsConvert text to base64 or hex and back, without waiting for Dash.DotClose the dot from your code, the same as going back from its first page.HelpersTell errors apart, handle a picker the person closed, and search as the person types.