crypt.user

Documentation of Synapse Z crypt.user library

crypt.user.encrypt

string crypt.user.encrypt(data: string, type: number, additional_data: string?)

uses libsodium secretbox or aead if additonal_data is provided, nonce is appended to the start

type can be any of following:

TypeNameTypeValueDescription
SynapseAccount0the data could be decrypted if the user have the same synapse account
WindowsAccount1the data could be decrypted if the user have the same synapse account and the same windows account
SynapseIdentifier2the data could be decrypted if the user have the same synapse acciunt and same HWID

crypt.user.decrypt

string crypt.user.decrypt(data: string, type: number, additional_data: string?)

uses libsodium secretbox or aead if additonal_data is provided, see crypt.user.encrypt