Example #1
0
void CurlCacheEntry::generateBaseFilename(const CString& url)
{
    MD5 md5;
    md5.addBytes(reinterpret_cast<const uint8_t*>(url.data()), url.length());

    MD5::Digest sum;
    md5.checksum(sum);
    uint8_t* rawdata = sum.data();

    for (size_t i = 0; i < MD5::hashSize; i++)
        appendByteAsHex(rawdata[i], m_basename, Lowercase);
}
bool Coder<MD5::Digest>::decode(Decoder& decoder, MD5::Digest& digest)
{
    return decoder.decodeFixedLengthData(digest.data(), sizeof(digest));
}
void Coder<MD5::Digest>::encode(Encoder& encoder, const MD5::Digest& digest)
{
    encoder.encodeFixedLengthData(digest.data(), sizeof(digest));
}