![]() |
A limited number of cryptographic routines are available in <zeep/crypto.hpp>
.
These can be divided in the following categories:
The functions encode and decode functions take a std::string and return the
encoded or decoded content. There are three encoding schemes, hex
,
base64
and base64url
. The latter is simply base64
but with a different characterset and without the trailing =
characters allowing their use in a URL.
There are three hash algorithm implementations. These are md5
,
sha1
and sha256
. All of them take a std::string
and return a std::string with the resulting hash. Note that these strings
are not human readable and may contain null characters. Therefore you need
the encoding routines to convert a hash into something you can print to the
screen e.g.
Hashed message authentication codes can be calculated using the available hash functions. Again, these functions take std::string parameters for the message and the key. The result is again a binary std::string.
Two key derivation routines are on offer, both of them PBKDF2, one using HMAC SHA1 and the other HMAC SHA256.