Adds compression flag to toHex/toBin and tests

This commit is contained in:
Daniel Cousens 2014-03-25 03:31:55 +11:00
parent c42e0fb8e0
commit a96dfea1f4
2 changed files with 33 additions and 14 deletions

View file

@ -156,12 +156,12 @@ ECPubKey.prototype.toBytes = function(compressed) {
return this.pub.getEncoded(compressed)
}
ECPubKey.prototype.toHex = function() {
return convert.bytesToHex(this.toBytes())
ECPubKey.prototype.toHex = function(compressed) {
return convert.bytesToHex(this.toBytes(compressed))
}
ECPubKey.prototype.toBin = function() {
return convert.bytesToString(this.toBytes())
ECPubKey.prototype.toBin = function(compressed) {
return convert.bytesToString(this.toBytes(compressed))
}
ECPubKey.prototype.toWif = function(version) {