crypto.user.prompt
All Per-User APIs also have a prompting equivalent under the syn.crypt.user.prompt
table. These functions make a verification box asking the user to authenticate the request made by the script, and only return the data if the user accepts. This is more useful for more 'high security' data that you dont want cryptographic operations performed on by an unauthorized script.
All of these functions yield as well, with the exclusion of syn.crypt.user.prompt.verify
which does not need to be authenticated by the user.
Functions
encrypt
string syn.crypt.user.prompt.encrypt(data: string, mode: UserEncryptionMode, key?: string) [yields]
Prompt equivalent to syn.crypt.user.encrypt.
decrypt
string syn.crypt.user.prompt.decrypt(ciphertext: string, key?: string) [yields]
Prompt equivalent to syn.crypt.user.decrypt
sign
string syn.crypt.user.prompt.sign(data: string) [yields]
Prompt equivalent to syn.crypt.user.sign.
verify
bool syn.crypt.user.prompt.verify(data: string, signature: string)
Prompt equivalent to syn.crypt.user.verify.