AWSSignatureGenerator 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package AWSSignatureGenerator --version 1.0.1                
NuGet\Install-Package AWSSignatureGenerator -Version 1.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AWSSignatureGenerator" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AWSSignatureGenerator --version 1.0.1                
#r "nuget: AWSSignatureGenerator, 1.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install AWSSignatureGenerator as a Cake Addin
#addin nuget:?package=AWSSignatureGenerator&version=1.0.1

// Install AWSSignatureGenerator as a Cake Tool
#tool nuget:?package=AWSSignatureGenerator&version=1.0.1                

alt tag

AWSSignatureGenerator

Library for generating AWS V4 signatures. This library has not been tested comprehensively; bugs likely exist. Multiple examples of AWS V4 signature generation exists in random places and seemingly all of them have issues. This code was built using the AWS CLI and boto as a reference.

NuGet Version NuGet

Feedback and Enhancements

Encounter an issue or have an enhancement request? Please file an issue or start a discussion here!

New in v1.0.x

  • Initial release supporting V4 signatures

Examples

Refer to the Test project for a full examples.

using AWSSignatureGenerator;

NameValueCollection headers = new NameValueCollection
{
  { "Host", "localhost:8000" },
  { "x-amz-content-sha256", "[sha256 hash, lowercase hex string" },
  { "x-amz-date", "20231109T012345Z" }
};

V4SignatureResult result = new V4SignatureResult(
  "20231109T012345Z",           // timestamp, of the form yyyyMMddTHHmmssZ
  "GET",                        // HTTP method
  "http://localhost:8000/",     // URL
  "AKIAIOSFODNN7EXAMPLE",       // access key
  "wJalrXU...EXAMPLEKEY",       // secret key
  "us-west-1",                  // region
  "s3",                         // service
  headers,                      // request headers
  body,                         // request body, string, byte[], or Stream
  V4PayloadHashEnum.Signed      // Signed, IsStreaming, Unsigned
  );

Console.WriteLine("Signature            : " + result.Signature);
Console.WriteLine("Authorization header : " + result.AuthorizationHeader);

Version History

Refer to CHANGELOG.md for details.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.
  • net7.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on AWSSignatureGenerator:

Package Downloads
S3Server

Emulated Amazon Web Services (AWS) Simple Storage Service (S3) server-side interface.

S3Lite

Lightweight Amazon S3 client without all the heft and dependency drag of the official library.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.8 457 8/28/2024
1.0.7 84 8/28/2024
1.0.6 116 8/28/2024
1.0.5 95 8/28/2024
1.0.4 86 8/28/2024
1.0.3 2,025 4/29/2024
1.0.1 4,337 11/11/2023
1.0.0 120 11/10/2023

Initial release