SiddiqSoft.AzureCppUtils
1.2.3
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package SiddiqSoft.AzureCppUtils --version 1.2.3
NuGet\Install-Package SiddiqSoft.AzureCppUtils -Version 1.2.3
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="SiddiqSoft.AzureCppUtils" Version="1.2.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SiddiqSoft.AzureCppUtils" Version="1.2.3" />
<PackageReference Include="SiddiqSoft.AzureCppUtils" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SiddiqSoft.AzureCppUtils --version 1.2.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SiddiqSoft.AzureCppUtils, 1.2.3"
#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.
#:package SiddiqSoft.AzureCppUtils@1.2.3
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SiddiqSoft.AzureCppUtils&version=1.2.3
#tool nuget:?package=SiddiqSoft.AzureCppUtils&version=1.2.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Azure C++ Utils : Azure REST API Helpers for Modern C++
Objective
- Collect useful helpers for Azure REST API in a single location.
- Header-only
- Use Win32 functions on Windows
Requirements
- The build and tests are for Visual Studio 2019 under x64.
Usage
- Use the nuget SiddiqSoft.AzureCppUtils
- Copy paste..whatever works.
Features
- DateUtils
- RFC7231 and RFC1123
- ISO8601
- ConversionUtils
- utf8fromWide
- wideFromUtf8
- Bas64Utils
- encode
- decode
- EncryptionUtils
- MD5
- HMAC
- JWTSHA256
- SASToken
- CosmosToken
All of the functions support string and wstring. However, the EncryptionUtils have disabled the support for wstring as it is
API
struct ConversionUtils
{
string asciiFromWide(const wstring& src);
string utf8FromWide( const wstring& src);
wstring wideFromUtf8( const string& src);
wstring wideFromAscii(const string& src);
}
struct DateUtils
{
template <typename T = char>
requires same_as<T, char> || same_as<T, wchar_t>
basic_string<T> ISO8601(const chrono::system_clock::time_point& rawtp = chrono::system_clock::now())
template <typename T = char>
requires same_as<T, char> || same_as<T, wchar_t>
basic_string<T> RFC7231(const chrono::system_clock::time_point& rawtp = chrono::system_clock::now())
}
struct Base64Utils
{
template <typename T = char>
requires same_as<T, char> || same_as<T, wchar_t>
basic_string<T> urlEscape(const basic_string<T>& src)
template <typename T = char>
requires same_as<T, char> || same_as<T, wchar_t>
basic_string<T> encode(const basic_string<T>& argBin)
template <typename T = char>
requires same_as<T, char> || same_as<T, wchar_t>
basic_string<T> decode(const basic_string<T>& argEncoded)
}
struct UrlUtils
{
template <typename T = char>
requires same_as<T, char> || same_as<T, wchar_t>
basic_string<T> encode(const basic_string<T>& source, bool lowerCase = false)
}
struct EncryptionUtils
{
// Always returns a "binary" in std::string
template <typename T = char>
requires same_as<T, char> || same_as<T, wchar_t>
string MD5(const basic_string<T>& source)
// Always returns a "binary" in std::string
template <typename T = char>
requires same_as<T, char> || same_as<T, wchar_t>
string HMAC(const basic_string<T>& message,
const string& key) // "binary" or decoded
template <typename T = char>
requires same_as<T, char> || same_as<T, wchar_t>
basic_string<T>
JWTHMAC256(const string& key, // "binary" or decoded
const basic_string<T>& header,
const basic_string<T>& payload)
// Returns tokens that can be used in the HTTP request header
// Note that the key is always in std::string since they are decoded from base64 values from the Azure portal.
template <typename T = char>
requires same_as<T, char> || same_as<T, wchar_t>
basic_string<T> SASToken(const string& key, // "binary" or decoded
const basic_string<T>& url,
const basic_string<T>& keyName,
const chrono::seconds& timeout)
// Returns tokens that can be used in the HTTP request header
// Note that the key is always in std::string since they are decoded from base64 values from the Azure portal.
template <typename T = char>
requires same_as<T, char> || same_as<T, wchar_t>
basic_string<T> SASToken(const string& key, // "binary" or decoded
const basic_string<T>& url,
const basic_string<T>& keyName,
const basic_string<T>& expiry)
// Returns tokens that can be used in the HTTP request header
// Note that the key is always in std::string since they are decoded from base64 values from the Azure portal.
template <typename T = char>
requires same_as<T, char> || same_as<T, wchar_t>
basic_string<T> CosmosToken(const string& key, // "binary" or decoded
const basic_string<T>& verb,
const basic_string<T>& type,
const basic_string<T>& resourceLink,
const basic_string<T>& date)
}
<p align="right"> © 2021 Siddiq Software LLC. All rights reserved. </p>
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| native | native is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
- SiddiqSoft.RunOnEnd (>= 1.2.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on SiddiqSoft.AzureCppUtils:
| Package | Downloads |
|---|---|
|
SiddiqSoft.restcl
Focussed REST Client for modern C++ |
|
|
SiddiqSoft.CosmosClient
Azure Cosmos REST-API Client for Modern C++ |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.1 | 284 | 12/22/2024 |
| 3.0.0 | 239 | 12/22/2024 |
| 2.0.1 | 414 | 12/12/2024 |
| 2.0.0 | 291 | 12/12/2024 |
| 1.6.7 | 257 | 12/7/2024 |
| 1.6.6 | 257 | 12/6/2024 |
| 1.6.5.1 | 252 | 12/4/2024 |
| 1.6.3.1 | 245 | 12/4/2024 |
| 1.6.2 | 236 | 12/4/2024 |
| 1.6.1.1 | 225 | 12/4/2024 |
| 1.5.6 | 307 | 10/26/2024 |
| 1.5.5 | 394 | 9/30/2024 |
| 1.5.4 | 252 | 9/28/2024 |
| 1.5.3 | 844 | 12/22/2021 |
| 1.5.2 | 652 | 12/20/2021 |
| 1.5.1 | 777 | 12/20/2021 |
| 1.5.0 | 6,724 | 12/16/2021 |
| 1.4.2 | 997 | 12/8/2021 |
| 1.4.1 | 3,197 | 11/20/2021 |
| 1.3.0 | 2,341 | 10/11/2021 |
| 1.2.9 | 835 | 9/3/2021 |
| 1.2.8 | 733 | 9/3/2021 |
| 1.2.7 | 757 | 9/2/2021 |
| 1.2.6 | 831 | 9/2/2021 |
| 1.2.5 | 777 | 9/2/2021 |
| 1.2.4 | 765 | 9/2/2021 |
| 1.2.3 | 678 | 9/2/2021 |
| 1.2.2 | 872 | 8/28/2021 |
| 1.2.1 | 823 | 8/27/2021 |
| 1.1.2 | 814 | 8/26/2021 |
| 1.1.1 | 835 | 8/24/2021 |
| 1.1.0 | 779 | 8/23/2021 |
| 1.0.2 | 785 | 8/22/2021 |
| 1.0.1 | 863 | 8/22/2021 |
| 1.0.0 | 5,070 | 8/22/2021 |