code: function fingerprint(key) {
      assert.equal('string', typeof key, 'typeof ssh_key');
  
      var pieces = key.split(' ');
      if (!pieces || !pieces.length || pieces.length < 2)
        throw new Error('invalid ssh key');
  
      var data = new Buffer(pieces[1], 'base64');
  
      var hash = crypto.createHash('md5');
      hash.update(data);
      var digest = hash.digest('hex');
  
      var fp = '';
      for (var i = 0; i < digest.length; i++) {
        if (i && i % 2 === 0)
          fp += ':';
  
        fp += digest[i];
      }
  
      return fp;
    }
docs: Generates an OpenSSH fingerprint from an ssh public key.
  
  @param {String} key an OpenSSH public key.
  @return {String} key fingerprint.
  @throws {TypeError} on bad input.
  @throws {Error} if what you passed doesn't look like an ssh public key.