#include <boost/uuid/sha1.hpp>
#include <iostream>
#include <string.h>
using namespace std;
using namespace boost::uuids::detail;

int main(){
sha1 sha;
char *szMsg = "a short message";
sha.process_byte(0x10);//处理一个字节
sha.process_bytes(szMsg,strlen(szMsg));//处理多个字节
sha.process_block(szMsg,szMsg+strlen(szMsg));

unsigned int digest[5];
sha.get_digest(digest);
for(int i=0;i<5;++i){
cout << hex << digest[i];//16进制输出,oct八进制
}
}

ae0871e0a767f827dbb07d259bf9b19b9933ce38