// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: md5.h,v 1.1 1998/10/31 05:19:59 jgg Exp $
+// $Id: md5.h,v 1.3 1999/01/18 06:20:08 jgg Exp $
/* ######################################################################
MD5SumValue - Storage for a MD5Sum
// Accessors
bool operator ==(const MD5SumValue &rhs) const;
string Value() const;
- inline operator string() const {return Value();};
+ inline void Value(unsigned char S[16])
+ {for (int I = 0; I != sizeof(Sum); I++) S[I] = Sum[I];};
+ inline operator string() const {return Value();};
bool Set(string Str);
-
+ inline void Set(unsigned char S[16])
+ {for (int I = 0; I != sizeof(Sum); I++) Sum[I] = S[I];};
+
MD5SumValue(string Str);
MD5SumValue();
};
public:
bool Add(const unsigned char *Data,unsigned long Size);
+ inline bool Add(const char *Data) {return Add((unsigned char *)Data,strlen(Data));};
bool AddFD(int Fd,unsigned long Size);
inline bool Add(const unsigned char *Beg,const unsigned char *End)
{return Add(Beg,End-Beg);};