Fix namespaces, copyright and magic numbers
This commit is contained in:
parent
d3731253e4
commit
327d93a6a4
3 changed files with 27 additions and 24 deletions
|
@ -1,30 +1,28 @@
|
|||
/* Copyright 2015, Michele Santullo
|
||||
* This file is part of DoorKeeper.
|
||||
/* Copyright 2016-2021, Michele Santullo
|
||||
* This file is part of "duckhandy".
|
||||
*
|
||||
* DoorKeeper is free software: you can redistribute it and/or modify
|
||||
* "duckhandy" is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* DoorKeeper is distributed in the hope that it will be useful,
|
||||
* "duckhandy" is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with DoorKeeper. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with "duckhandy". If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef id1E6CCE44307549A9B6C9E4E5923AC002
|
||||
#define id1E6CCE44307549A9B6C9E4E5923AC002
|
||||
|
||||
//#include "doorkeeper/helpers/hashing.hpp"
|
||||
//#include "doorkeeper/implem/compatibility.h"
|
||||
#include <cstdint>
|
||||
#include <ciso646>
|
||||
#include <climits>
|
||||
|
||||
namespace dk {
|
||||
namespace dhandy::bt {
|
||||
struct HashType {
|
||||
constexpr HashType ( uint64_t parA, uint64_t parB, uint64_t parC ) :
|
||||
a(parA), b(parB), c(parC)
|
||||
|
@ -50,9 +48,12 @@ namespace dk {
|
|||
uint64_t c;
|
||||
};
|
||||
|
||||
inline const constexpr char TigerPaddingV1 = 0x01;
|
||||
inline const constexpr char TigerPaddingV2 = 0x80;
|
||||
|
||||
[[gnu::const]]
|
||||
constexpr HashType tiger ( const char* parStr, uint64_t parLen, char parPad );
|
||||
} //namespace dk
|
||||
} //namespace dhandy::bt
|
||||
|
||||
#include "tiger_bt.inl"
|
||||
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
/* Copyright 2015, Michele Santullo
|
||||
* This file is part of DoorKeeper.
|
||||
/* Copyright 2016-2021, Michele Santullo
|
||||
* This file is part of "duckhandy".
|
||||
*
|
||||
* DoorKeeper is free software: you can redistribute it and/or modify
|
||||
* "duckhandy" is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* DoorKeeper is distributed in the hope that it will be useful,
|
||||
* "duckhandy" is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with DoorKeeper. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with "duckhandy". If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef lengthof
|
||||
|
@ -20,7 +20,7 @@
|
|||
# define UNDEF_lengthof
|
||||
#endif
|
||||
|
||||
namespace dk {
|
||||
namespace dhandy::bt {
|
||||
namespace implem {
|
||||
constexpr const uint64_t table[4*256] = {0x02AAB17CF7E90C5EULL, 0xAC424B03E243A8ECULL,
|
||||
0x72CD5BE30DD5FCD3ULL, 0x6D019B93F6F97F3AULL, 0xCD9978FFD21F9193ULL, 0x7573A1C9708029E2ULL,
|
||||
|
@ -490,7 +490,7 @@ namespace dk {
|
|||
parPad
|
||||
);
|
||||
}
|
||||
} //namespace dk
|
||||
} //namespace dhandy::bt
|
||||
|
||||
#if defined UNDEF_lengthof
|
||||
# undef lengthof
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue