Merge pull request #53 from coinpunk/base58cleanup

Remove unused hex helpers
This commit is contained in:
Wei Lu 2014-03-07 15:03:23 +08:00
commit ad9f1ddfd5

View file

@ -38,10 +38,6 @@ module.exports.encode = function (input) {
return chars.reverse().join(''); return chars.reverse().join('');
}, },
module.exports.encodeHex = function (input) {
return conv.bytesToHex(module.exports.encode(input));
}
// decode a base58 string into a byte array // decode a base58 string into a byte array
// input should be a base58 encoded string // input should be a base58 encoded string
// @return Array // @return Array
@ -82,10 +78,6 @@ module.exports.decode = function (input) {
return bytes; return bytes;
} }
module.exports.decodeHex = function (input) {
return module.exports.decode(conv.hexToBytes(input));
}
module.exports.checkEncode = function(input, vbyte) { module.exports.checkEncode = function(input, vbyte) {
vbyte = vbyte || 0; vbyte = vbyte || 0;
var front = [vbyte].concat(input); var front = [vbyte].concat(input);
@ -94,10 +86,6 @@ module.exports.checkEncode = function(input, vbyte) {
return module.exports.encode(front.concat(checksum)); return module.exports.encode(front.concat(checksum));
} }
module.exports.checkEncodeHex = function (input, vbyte) {
return conv.bytesToHex(module.exports.encode(input));
}
module.exports.checkDecode = function(input) { module.exports.checkDecode = function(input) {
var bytes = module.exports.decode(input), var bytes = module.exports.decode(input),
front = bytes.slice(0,bytes.length-4), front = bytes.slice(0,bytes.length-4),
@ -111,9 +99,3 @@ module.exports.checkDecode = function(input) {
o.version = front[0]; o.version = front[0];
return o; return o;
} }
module.exports.checkDecodeHex = function (input) {
return module.exports.checkDecode(conv.hexToBytes(input));
}