This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var lzf = require('lzf'); | |
var crypto = require('crypto'); | |
function DecodeSaveData(data) { | |
// Format is: .<Base64 encoded LZF compressed data>|<MD5 hash of data> | |
if (data.indexOf('.') !== 0) { | |
throw Error('Invalid save data'); | |
} | |
var splitStr = data.substr(1).split('|'); |