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
const crypto = require("crypto"); | |
/** | |
* Encrypt 3DES using Node.js's crypto module * | |
* @param data A utf8 string | |
* @param key Key would be hashed by md5 and shorten to maximum of 192 bits, | |
* @returns {*} A base64 string | |
*/ | |
function encrypt3DES(data, key) { | |
const md5Key = crypto.createHash('md5').update(key).digest("hex").substr(0, 24); |
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
fabric.LabeledRect = fabric.util.createClass(fabric.Rect, { | |
type: 'labeledRect', | |
toObject: function() { | |
return fabric.util.object.extend(this.callSuper('toObject'), { | |
label: this.get('label') | |
}); | |
}, |