code: function md5(data, digest) {
              var hash = "";
  
              if (!digest) { digest = 'binary'; }
  
              if (digest === 'buffer') {
                  digest = undefined;
                  // todo: 不支持 buffer 类型的 hash
                  return "";
              }
  
              if (typeof data === 'string') {
                  switch (digest) {
                      case "binary":
                          return SparkMD5.hash(data, true);
                      case "hex":
                          return SparkMD5.hash(data);
                      case "base64":
                          return TableStore.util.hexToBase64(SparkMD5.hash(data));
                      default:
                          return "";
                  }
              }
              else {  // array buffer
                  switch (digest) {
                      case "binary":
                          return SparkMD5.ArrayBuffer.hash(data, true);
                      case "hex":
                          return SparkMD5.ArrayBuffer.hash(data);
                      case "base64":
                          return TableStore.util.hexToBase64(SparkMD5.ArrayBuffer.hash(data));
                      default:
                          return "";
                  }
              }
          }
docs: https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding