x64 fixICU fixes
git-svn-id: svn://db.shs.com.ru/pip@99 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -1,3 +1,25 @@
|
||||
/*! \file picrypt.h
|
||||
* \brief Cryptographic class using lib Sodium
|
||||
*/
|
||||
/*
|
||||
PIP - Platform Independent Primitives
|
||||
Cryptographic class using lib Sodium
|
||||
Copyright (C) 2015 Andrey Bychkov work.a.b@yandex.ru
|
||||
|
||||
This program 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.
|
||||
|
||||
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 General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef PICRYPT_H
|
||||
#define PICRYPT_H
|
||||
|
||||
@@ -7,28 +29,21 @@ class PICrypt {
|
||||
public:
|
||||
PICrypt();
|
||||
|
||||
bool setKey(const PIByteArray &secret);
|
||||
PIByteArray setKey(const PIString &secret);
|
||||
|
||||
PIByteArray getKey();
|
||||
|
||||
PIByteArray crypt(const PIByteArray &data);
|
||||
|
||||
PIByteArray decrypt(const PIByteArray &crypt_data, bool * ok = 0);
|
||||
|
||||
static PIByteArray crypt(const PIByteArray &data, const PIByteArray &secret);
|
||||
|
||||
static PIByteArray decrypt(const PIByteArray &crypt_data, const PIByteArray &secret, bool * ok = 0);
|
||||
|
||||
static PIByteArray hash(const PIString &secret);
|
||||
bool setKey(const PIByteArray & secret);
|
||||
PIByteArray setKey(const PIString & secret);
|
||||
PIByteArray key() {return key_;}
|
||||
PIByteArray crypt(const PIByteArray & data);
|
||||
PIByteArray decrypt(const PIByteArray & crypt_data, bool * ok = 0);
|
||||
|
||||
static PIByteArray crypt(const PIByteArray & data, const PIByteArray & key);
|
||||
static PIByteArray decrypt(const PIByteArray & crypt_data, const PIByteArray & key, bool * ok = 0);
|
||||
static PIByteArray hash(const PIString & secret);
|
||||
static int sizeKey();
|
||||
|
||||
static int sizeCrypt();
|
||||
|
||||
private:
|
||||
PIByteArray nonce;
|
||||
PIByteArray key;
|
||||
PIByteArray nonce_, key_;
|
||||
|
||||
};
|
||||
|
||||
#endif // PICRYPT_H
|
||||
|
||||
Reference in New Issue
Block a user