Index Visio files using vsd2xhtml
[xapian.git] / xapian-applications / omega / md5wrap.h
blob2d6a5fa7e1fbc3f5041f1013890d0ecd95bdc49f
1 /* md5wrap.h: wrapper functions to allow easy use of MD5 from C++.
3 * Copyright (C) 2006,2007,2010,2013 Olly Betts
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 #ifndef OMEGA_INCLUDED_MD5WRAP_H
21 #define OMEGA_INCLUDED_MD5WRAP_H
23 #include <string>
25 bool md5_file(const std::string &file_name, std::string &md5, bool try_noatime);
26 void md5_block(const char * p, size_t len, std::string &md5);
27 inline void md5_string(const std::string &str, std::string &md5) {
28 md5_block(str.data(), str.size(), md5);
31 #endif // OMEGA_INCLUDED_MD5WRAP_H