Files
pip/libs/main/digest/pidigest_sha2_p.h

40 lines
1.3 KiB
C++

/*
PIP - Platform Independent Primitives
Digest algorithms
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef pidigest_sha2_h
#define pidigest_sha2_h
#include "pibytearray.h"
class SHA2 {
public:
static const uint32_t initial_224[8];
static const uint32_t initial_256[8];
static const uint64_t initial_384[8];
static const uint64_t initial_512[8];
static const uint64_t initial_512_256[8];
static const uint64_t initial_512_224[8];
static PIByteArray sha2xx(const PIByteArray & in, const uint32_t * initial, int out_bytes);
static PIByteArray sha5xx(const PIByteArray & in, const uint64_t * initial, int out_bytes);
};
#endif