This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
component:data [2019/03/09 15:59] is2511 [Tier 3 Callbacks] |
component:data [2021/01/19 16:08] tshaw [Tier 1 Callbacks] |
||
---|---|---|---|
Line 9: | Line 9: | ||
- `crc32(data:string):string` | - `crc32(data:string):string` | ||
- | Computes CRC-32 hash of the data. Result is in binary format | + | Computes CRC-32 hash of the data. Result is in binary format. |
- `decode64(data:string):string` | - `decode64(data:string):string` | ||
Applies base64 decoding to the data. | Applies base64 decoding to the data. | ||
- `encode64(data:string):string` | - `encode64(data:string):string` | ||
- | Applies base64 encoding to the data. | + | Applies base64 encoding to the data. Result is in binary format. |
- `md5(data:string):string` | - `md5(data:string):string` | ||
Computes MD5 hash of the data. Result is in binary format | Computes MD5 hash of the data. Result is in binary format | ||
Line 45: | Line 45: | ||
- `ecdsa(data:string, key:userdata[, sig:string]):string or boolean` | - `ecdsa(data:string, key:userdata[, sig:string]):string or boolean` | ||
Generates a signiture of data using a private key. If signature is present | Generates a signiture of data using a private key. If signature is present | ||
- | verifies the signature using the public key and the previously generated | + | verifies the signature using the public key, the previously generated |
- | generated signature string. and the original string. | + | signature string and the original string. |
- | - `ecdh(privateKey:userdata, publicKey:userData):string` | + | - `ecdh(privateKey:userdata, publicKey:userdata):string` |
Generates a Diffie-Hellman shared key using the first user's private key and | Generates a Diffie-Hellman shared key using the first user's private key and | ||
the second user's public key. An example of a basic key relation: | the second user's public key. An example of a basic key relation: |