Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
component:data [2016/05/24 23:58]
tykuhn2 Added cryptographic functions and "random"
component:data [2016/12/08 20:52]
solra_bizna Tell which callbacks are at which tier
Line 4: Line 4:
  
 Component name: `data`.  ​ Component name: `data`.  ​
-Callbacks:+ 
 +Tier 1 Callbacks 
 +----------------
  
 - `crc32(data:​string):​string`  ​ - `crc32(data:​string):​string`  ​
Line 22: Line 24:
 - `getLimit():​number`  ​ - `getLimit():​number`  ​
   The maximum size of data that can be passed to other functions of the card.   The maximum size of data that can be passed to other functions of the card.
 +
 +Tier 2 Callbacks
 +----------------
 +
 - `encrypt(data:​string,​ key:string, iv:​string):​string`  ​ - `encrypt(data:​string,​ key:string, iv:​string):​string`  ​
   Applies AES encryption to the data using the key and (preferably) random IV.   Applies AES encryption to the data using the key and (preferably) random IV.
 - `decrypt(data:​string,​ key:string, iv:​string):​string`  ​ - `decrypt(data:​string,​ key:string, iv:​string):​string`  ​
   Reverses AES encryption on the data using the key and the IV.   Reverses AES encryption on the data using the key and the IV.
 +- `random(len:​number):​string`  ​
 +  Generates a random binary string of `len` length.
 +
 +Tier 3 Callbacks
 +----------------
 +
 - `generateKeyPair([bitLen:​number]):​table,​ table`  ​ - `generateKeyPair([bitLen:​number]):​table,​ table`  ​
   Generates a public/​private key pair for various cryptiographic functions.  ​   Generates a public/​private key pair for various cryptiographic functions.  ​
Line 41: Line 53:
 - `deserializeKey(data:​string,​ type:​string):​table`  ​ - `deserializeKey(data:​string,​ type:​string):​table`  ​
   Transforms a key from string to it's arbitrary type.   Transforms a key from string to it's arbitrary type.
-- `random(len:​number):​string` ​  +
-  Generates a random binary string of `len` length. +
-  ​+
 ---- ----
  
 {{page>​component:​contents&​noheader&​noeditbutton&​nouser&​nofooter}} {{page>​component:​contents&​noheader&​noeditbutton&​nouser&​nofooter}}