code: function (input) {
  			var bi = BigInteger.fromByteArrayUnsigned(input);
  			var chars = [];
  
  			while (bi.compareTo(B58.base) >= 0) {
  				var mod = bi.mod(B58.base);
  				chars.unshift(B58.alphabet[mod.intValue()]);
  				bi = bi.subtract(mod).divide(B58.base);
  			}
  			chars.unshift(B58.alphabet[bi.intValue()]);
  
  			// Convert leading zeros too.
  			for (var i = 0; i < input.length; i++) {
  				if (input[i] == 0x00) {
  					chars.unshift(B58.alphabet[0]);
  				} else break;
  			}
  
  			return chars.join('');
  		}
docs: Convert a byte array to a base58-encoded string.
  
  Written by Mike Hearn for BitcoinJ.
  Copyright (c) 2011 Google Inc.
  
  Ported to JavaScript by Stefan Thomas.