code: function createSHAHash(buffer, algorithm) {
      var logger = getLogger('utility.createSHA1Hash');
      var sha1sum = crypto.createHash(algorithm || 'sha1');
      if (require('util').isArray(buffer)) {
          if (logger.isDebugEnabled()) {
              logger.debug('It\'s an Array of buffers');
          }
          for (var i = 0; i < buffer.length; i++) {
              sha1sum.update(buffer[i]);
          }
      } else {
          if (logger.isDebugEnabled()) {
              logger.debug('It\'s only one buffer');
          }
          sha1sum.update(buffer);
      }
      return sha1sum.digest();
  }
docs: Create SHA1 hash starting from a buffer or an array of buffers