Public Member Functions | Private Attributes | List of all members
cet::MD5Digest Class Reference

#include <MD5Digest.h>

Public Member Functions

 MD5Digest ()
 
 MD5Digest (std::string const &s)
 
void append (std::string const &s)
 
MD5Result digest () const
 

Private Attributes

MD5_CTX context_
 

Detailed Description

Definition at line 58 of file MD5Digest.h.

Constructor & Destructor Documentation

cet::MD5Digest::MD5Digest ( )

Definition at line 120 of file MD5Digest.cc.

120 : context_() { MD5_Init(&context_); }
MD5_CTX context_
Definition: MD5Digest.h:67
cet::MD5Digest::MD5Digest ( std::string const &  s)
explicit

Definition at line 122 of file MD5Digest.cc.

122  : context_()
123  {
124  MD5_Init(&context_);
125  this->append(s);
126  }
void append(std::string const &s)
Definition: MD5Digest.cc:129
MD5_CTX context_
Definition: MD5Digest.h:67
static QCString * s
Definition: config.cpp:1042

Member Function Documentation

void cet::MD5Digest::append ( std::string const &  s)

Definition at line 129 of file MD5Digest.cc.

130  {
131  using md5_byte_t = unsigned char;
132  md5_byte_t const* data = reinterpret_cast<md5_byte_t const*>(s.data());
133  MD5_Update(&context_, const_cast<md5_byte_t*>(data), s.size());
134  }
MD5_CTX context_
Definition: MD5Digest.h:67
uint size() const
Definition: qcstring.h:201
const char * data() const
Definition: qcstring.h:207
static QCString * s
Definition: config.cpp:1042
MD5Result cet::MD5Digest::digest ( ) const

Definition at line 137 of file MD5Digest.cc.

138  {
139  MD5Result aDigest;
140  MD5_Final(aDigest.bytes, &context_);
141  return aDigest;
142  }
MD5_CTX context_
Definition: MD5Digest.h:67

Member Data Documentation

MD5_CTX cet::MD5Digest::context_
mutableprivate

Definition at line 67 of file MD5Digest.h.


The documentation for this class was generated from the following files: