cuttlefish.js
function canonicalMd5(md5) {
  if (md5) {
    if (Buffer.isBuffer(md5))
      md5 = md5.toString('base64')
    else if (md5 && md5.match(/^md5-/))
      md5 = md5.replace(/^md5-/, '')

    if (md5.length === 32)
      md5 = new Buffer(md5, 'hex').toString('base64')
  }
  return md5
}
function canonicalMd5(md5) {
  if (md5) {
    if (Buffer.isBuffer(md5))
      md5 = md5.toString('base64')
    else if (md5 && md5.match(/^md5-/))
      md5 = md5.replace(/^md5-/, '')

    if (md5.length === 32)
      md5 = new Buffer(md5, 'hex').toString('base64')
  }
  return md5
}
File class Because of toString = this.name, it can be used interchangeably as a string key, and also as the object represented by that