MCPcopy Create free account
hub / github.com/Icinga/icinga2 / BinaryToHex

Function BinaryToHex

lib/base/tlsutility.cpp:1048–1058  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1046}
1047
1048String BinaryToHex(const unsigned char* data, size_t length) {
1049 static const char hexdigits[] = "0123456789abcdef";
1050
1051 String output(2*length, 0);
1052 for (int i = 0; i < SHA_DIGEST_LENGTH; i++) {
1053 output[2 * i] = hexdigits[data[i] >> 4];
1054 output[2 * i + 1] = hexdigits[data[i] & 0xf];
1055 }
1056
1057 return output;
1058}
1059
1060bool VerifyCertificate(const std::shared_ptr<X509> &caCertificate, const std::shared_ptr<X509> &certificate, const String& crlFile)
1061{

Callers 2

SHA1Function · 0.85
InitEnvironmentIdMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected