code: function (input, alphabetName) {
          var alphabet = alphabets[alphabetName || 'ripple'],
              base     = new sjcl.bn(alphabet.length),
              bi       = new sjcl.bn(0);
  
          var i;
          while (i != input.length && input[i] === alphabet[0]) {
            i += 1;
          }
  
          for (i = 0; i != input.length; i += 1) {
            var v = alphabet.indexOf(input[i]);
  
            if (v < 0) {
              return null;
            }
  
            bi = bi.mul(base).addM(v);
          }
  
          var bytes = sjcl.codec.bytes.fromBits(bi.toBits()).reverse();
  
          // Remove leading zeros
          while(bytes[bytes.length-1] === 0) {
            bytes.pop();
          }
  
          // Add the right number of leading zeros
          for (i = 0; input[i] === alphabet[0]; i++) {
            bytes.push(0);
          }
  
          bytes.reverse();
  
          return bytes;
        }
docs: --> input: String <-- array of bytes or undefined.