src/main/signing.js
function getSigningKey(date, region, secretKey) {
  if (!isObject(date)) {
    throw new TypeError('date should be of type "object"')
  }
  if (!isString(region)) {
    throw new TypeError('region should be of type "string"')
  }
  if (!isString(secretKey)) {
    throw new TypeError('secretKey should be of type "string"')
  }
  var dateLine = makeDateShort(date),
    hmac1 = Crypto.createHmac('sha256', 'AWS4' + secretKey).update(dateLine).digest(),
    hmac2 = Crypto.createHmac('sha256', hmac1).update(region).digest(),
    hmac3 = Crypto.createHmac('sha256', hmac2).update('s3').digest()
  return Crypto.createHmac('sha256', hmac3).update('aws4_request').digest()
}
function getSigningKey(date, region, secretKey) {
  if (!isObject(date)) {
    throw new TypeError('date should be of type "object"')
  }
  if (!isString(region)) {
    throw new TypeError('region should be of type "string"')
  }
  if (!isString(secretKey)) {
    throw new TypeError('secretKey should be of type "string"')
  }
  var dateLine = makeDateShort(date),
    hmac1 = Crypto.createHmac('sha256', 'AWS4' + secretKey).update(dateLine).digest(),
    hmac2 = Crypto.createHmac('sha256', hmac1).update(region).digest(),
    hmac3 = Crypto.createHmac('sha256', hmac2).update('s3').digest()
  return Crypto.createHmac('sha256', hmac3).update('aws4_request').digest()
}
function getSigningKey ( date , region , secretKey ) { if ( ! isObject ( date ) ) { throw new TypeError ( 'date should be of type "object"' ) } if ( ! isString ( region ) ) { throw new TypeError ( 'region should be of type "string"' ) } if ( ! isString ( secretKey ) ) { throw new TypeError ( 'secretKey should be of type "string"' ) } var dateLine = makeDateShort ( date ) , hmac1 = Crypto . createHmac ( 'sha256' , 'AWS4' + secretKey ) . update ( dateLine ) . digest ( ) , hmac2 = Crypto . createHmac ( 'sha256' , hmac1 ) . update ( region ) . digest ( ) , hmac3 = Crypto . createHmac ( 'sha256' , hmac2 ) . update ( 's3' ) . digest ( ) return Crypto . createHmac ( 'sha256' , hmac3 ) . update ( 'aws4_request' ) . digest ( ) }
returns the key used for calculating signature
returns the key used for calculating signature