WBO toString will serialize 'payload', CryptoWrapper overrides that and will serialize 'cleartext'

This commit is contained in:
Dan Mills 2009-01-23 15:08:12 -08:00
parent 078387cb07
commit 9c7bac20f5
2 changed files with 9 additions and 1 deletions

View File

@ -122,6 +122,14 @@ CryptoWrapper.prototype = {
}, },
decrypt: function CryptoWrap_decrypt(onComplete, passphrase) { decrypt: function CryptoWrap_decrypt(onComplete, passphrase) {
this._decrypt.async(this, onComplete, passphrase); this._decrypt.async(this, onComplete, passphrase);
},
toString: function WBORec_toString() {
return "{ id: " + this.id + "\n" +
" parent: " + this.parentid + "\n" +
" depth: " + this.depth + ", index: " + this.sortindex + "\n" +
" modified: " + this.modified + "\n" +
" payload: " + json.encode(this.cleartext) + " }";
} }
}; };

View File

@ -113,7 +113,7 @@ WBORecord.prototype = {
" parent: " + this.parentid + "\n" + " parent: " + this.parentid + "\n" +
" depth: " + this.depth + ", index: " + this.sortindex + "\n" + " depth: " + this.depth + ", index: " + this.sortindex + "\n" +
" modified: " + this.modified + "\n" + " modified: " + this.modified + "\n" +
" payload: " + json.encode(this.cleartext) + " }"; " payload: " + json.encode(this.payload) + " }";
} }
}; };