Source/NFX.Web/IO/FileSystem/S3/V4/S3V4Sign/S3V4Signer.cs
/// <summary>
/// Calculates signing key for given secret, timestamp and region
/// </summary>
Calculates signing key for given secret, timestamp and region
Calculates signing key for given secret timestamp and region
public byte[] GetScopedSigningKey(string secretKey, DateTime date, string region)
      {
        byte[] initialKey = (SCHEME + secretKey).S3Bytes();
        byte[] hashDate = ComputeKeyedHash(initialKey, date.S3DateString().S3Bytes());
        byte[] dateRegionKey = ComputeKeyedHash(hashDate, region.S3Bytes());
        byte[] dateRegionServiceKey = ComputeKeyedHash(dateRegionKey, S3SERVICE.S3Bytes());
        byte[] signingKey = ComputeKeyedHash(dateRegionServiceKey, TERMINATOR.S3Bytes());
        return signingKey;
      }
public byte [ ] GetScopedSigningKey ( string secretKey , DateTime date , string region ) { byte [ ] initialKey = ( SCHEME + secretKey ) . S3Bytes ( ) ; byte [ ] hashDate = ComputeKeyedHash ( initialKey , date . S3DateString ( ) . S3Bytes ( ) ) ; byte [ ] dateRegionKey = ComputeKeyedHash ( hashDate , region . S3Bytes ( ) ) ; byte [ ] dateRegionServiceKey = ComputeKeyedHash ( dateRegionKey , S3SERVICE . S3Bytes ( ) ) ; byte [ ] signingKey = ComputeKeyedHash ( dateRegionServiceKey , TERMINATOR . S3Bytes ( ) ) ; return signingKey ; }
Calculates signing key for given secret, timestamp and region
Calculates signing key for given secret timestamp and region
secretKey
string
date
DateTime
region
string