mtwin-codec
v0.0.2
Published
An implementation of Codec
Downloads
3
Readme
Codec implement of Codec
This is the second generation of the Codec used by Motion Twin to encrypt
client<>server
exchanges in their games.
Note
If you are looking for how to use it, you can look at some examples in the unit tests.
Constructor
// generate `this.codec` (length 255) from key and version.
new Codec(key: String, ?version: String = "")
Variables
private b64: Array
private codec: Array
Methods
// return the encoding of `data` according to `this.codec` as a string.
public encode(data: String): String
// return the decoding of `data` according to `this.codec` as a string.
public decode(data: String): String
private code(data: String, ?mode: Int = 0): String