|
@@ -4,6 +4,7 @@
|
|
|
|
|
|
#include "crypto_hash.h"
|
|
|
#include "crypto_endian.h"
|
|
|
+#include "a2functional.h"
|
|
|
|
|
|
#include <cstring>
|
|
|
#include <stdexcept>
|
|
@@ -1055,22 +1056,22 @@ std::unique_ptr<Algorithm> crypto::hash::create(Algorithms algo)
|
|
|
{
|
|
|
switch (algo) {
|
|
|
case algoMD5:
|
|
|
- return make_unique<MD5>();
|
|
|
+ return aria2::make_unique<MD5>();
|
|
|
|
|
|
case algoSHA1:
|
|
|
- return make_unique<SHA1>();
|
|
|
+ return aria2::make_unique<SHA1>();
|
|
|
|
|
|
case algoSHA224:
|
|
|
- return make_unique<SHA224>();
|
|
|
+ return aria2::make_unique<SHA224>();
|
|
|
|
|
|
case algoSHA256:
|
|
|
- return make_unique<SHA256>();
|
|
|
+ return aria2::make_unique<SHA256>();
|
|
|
|
|
|
case algoSHA384:
|
|
|
- return make_unique<SHA384>();
|
|
|
+ return aria2::make_unique<SHA384>();
|
|
|
|
|
|
case algoSHA512:
|
|
|
- return make_unique<SHA512>();
|
|
|
+ return aria2::make_unique<SHA512>();
|
|
|
|
|
|
default:
|
|
|
throw std::domain_error("Invalid hash algorithm");
|