File: hasher.cpp

package info (click to toggle)
entropybroker 2.9-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,600 kB
  • sloc: cpp: 14,386; sh: 934; makefile: 188; java: 148; perl: 12
file content (31 lines) | stat: -rw-r--r-- 483 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <string>
#include "hasher.h"
#include "hasher_md5.h"
#include "hasher_ripemd160.h"
#include "hasher_sha512.h"
#include "hasher_whirlpool.h"

hasher::hasher()
{
}

hasher::~hasher()
{
}

hasher *hasher::select_hasher(std::string type)
{
	if (type == "md5")
		return new hasher_md5();

	if (type == "ripemd160")
		return new hasher_ripemd160();

	if (type == "sha512")
		return new hasher_sha512();

	if (type == "whirlpool")
		return new hasher_whirlpool();

	return NULL;
}