Loading [MathJax]/extensions/tex2jax.js
SSS - S3 Toolkit 0.9.6
S3 client library and applications
Loading...
Searching...
No Matches
Internal

Data Structures

struct  sss::URL
 URL type. More...
 
struct  sss::Time
 Time data type, used to generate pre-signed URLs. More...
 

Functions

URL sss::ParseURL (const std::string &s)
 
std::string sss::UrlEncode (const std::string &s)
 
std::string sss::UrlEncode (const Map &p)
 
Time sss::GetDates ()
 
Bytes sss::Hash (const Bytes &key, const Bytes &msg)
 HMAC encoding byte arrays --> byte array.
 
std::string sss::Hex (const Bytes &b)
 Byte to hex string conversion.
 
Bytes sss::CreateSignatureKey (const std::string &key, const std::string &dateStamp, const std::string &region, const std::string &service)
 
Parameters sss::ParseParams (std::string s)
 
Headers sss::ParseHeaders (const std::string &s)
 
std::string sss::GetValue (const std::map< std::string, std::string > &map, const std::string &rx, bool caseSensitive=true)
 Map key to value using regular expression.
 
size_t sss::ReadFile (void *ptr, size_t size, size_t nmemb, void *userdata)
 Read from file.
 
size_t sss::WriteFile (char *ptr, size_t size, size_t nmemb, void *userdata)
 Write to file.
 
size_t sss::WriteFileUnbuffered (char *ptr, size_t size, size_t nmemb, void *userdata)
 Write to file using unbuffered I/O.
 

Variables

int sss::URL::port = -1
 internet port
 
std::string sss::URL::host
 host name
 
std::string sss::URL::proto
 protocol, one of http or https
 
std::string sss::Time::timeStamp
 full date-time in "%Y%m%dT%H%M%SZ" format
 
std::string sss::Time::dateStamp
 date in "%Y%m%d" format
 

Detailed Description

Function Documentation

◆ CreateSignatureKey()

Bytes sss::CreateSignatureKey ( const std::string &  key,
const std::string &  dateStamp,
const std::string &  region,
const std::string &  service 
)

Create signature key

Parameters
keythis is the secret part of the {key,secret} credentials
dateStampdate in the format "%Y%m%d"
regionregion e.g. us-east-1
serviceservice e.g. s3
Returns
hash of internally generated key and binary-encoded text "aws4_request"
+ Here is the caller graph for this function:

◆ GetDates()

Time sss::GetDates ( )

Return current time and date in the two formats required to sign AWS S3 requests

Returns
Time structure filled with both full date-time and date only

Return time in the two formats required to sign AWS requests:

  • full date-time
  • date only
+ Here is the caller graph for this function:

◆ Hash()

Bytes sss::Hash ( const Bytes key,
const Bytes msg 
)

HMAC encoding byte arrays --> byte array.

Create HMAC encoded byte array

Parameters
key
msgmessage to encode
Returns
HMAC hash

◆ Hex()

string sss::Hex ( const Bytes b)

Byte to hex string conversion.

Translate bytes to hexadecimal encoded ASCII string

Parameters
bbyte array
Returns
ASCII-encoded hex numbers
+ Here is the caller graph for this function:

◆ ParseHeaders()

Headers sss::ParseHeaders ( const std::string &  s)

From "key1:value1;key2:value2 to {key, value} dictionary See https://www.w3.org/Protocols/rfc2616/rfc2616.html

+ Here is the caller graph for this function:

◆ ParseParams()

Parameters sss::ParseParams ( std::string  s)

From "key1=value1;key2=value2;key3=;key4" to {key, value} dictionary

Parameters
stext
Returns
{name,value} dictionary
+ Here is the caller graph for this function:

◆ ParseURL()

URL sss::ParseURL ( const std::string &  s)

Extract URL parameters from string

See also
URL
Parameters
stext
Returns
URL
+ Here is the caller graph for this function:

◆ UrlEncode() [1/2]

string sss::UrlEncode ( const Map p)

URL-encode url from {key,value} pairs

Parameters
p{key,value} map
Returns
url-encoded url

References sss::UrlEncode().

+ Here is the call graph for this function:

◆ UrlEncode() [2/2]

string sss::UrlEncode ( const std::string &  s)

URL-encode url

Parameters
stext
Returns
url-encoded url
+ Here is the caller graph for this function: