Browse Source

Zmiana nazwy funkcji

legacy
Marek 10 years ago
parent
commit
828d0cd66f
  1. 6
      md5.cpp
  2. 6
      md5.h

6
md5.cpp

@ -271,7 +271,7 @@ string md5file(std::FILE* file){
return res;
}
string md5sum(const void* dat, size_t len) {
string md5(const void* dat, size_t len) {
string res;
unsigned char out[16];
md5bin(dat, len, out);
@ -282,8 +282,8 @@ string md5sum(const void* dat, size_t len) {
return res;
}
std::string md5sum(std::string dat){
return md5sum(dat.c_str(), dat.length());
std::string md5(std::string dat){
return md5(dat.c_str(), dat.length());
}
/* Generate shorter md5sum by something like base62 instead of base16 or base10. 0~61 are represented by 0-9a-zA-Z */

6
md5.h

@ -1,10 +1,12 @@
#ifndef MD5_H
#define MD5_H
#define _CRT_SECURE_NO_WARNINGS
#include <string>
std::string md5sum(std::string dat);
std::string md5sum(const void* dat, size_t len);
std::string md5(std::string dat);
std::string md5(const void* dat, size_t len);
std::string md5file(const char* filename);
std::string md5file(std::FILE* file);
std::string md5sum6(std::string dat);

Loading…
Cancel
Save