/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. *
*/
class COMPHELPER_DLLPUBLIC Crypto
{ protected:
std::shared_ptr<ICryptoImplementation> mpImpl;
Crypto();
public: virtual ~Crypto();
};
/** Decrypt vector of bytes with AES encryption */ class COMPHELPER_DLLPUBLIC Decrypt final : public Crypto
{ public:
Decrypt(std::vector<sal_uInt8>& key, std::vector<sal_uInt8>& iv, CryptoType type);
/** Encrypt vector of bytes with AES encryption */ class COMPHELPER_DLLPUBLIC Encrypt final : public Crypto
{ public: /** Initialize encryption for key, init vector and encryption type. * * key - encryption key, key size should be the same as block size * iv - init vector: it can be empty - will not be used (init vector will be 0)
*/
Encrypt(std::vector<sal_uInt8>& key, std::vector<sal_uInt8>& iv, CryptoType type);
/** Encrypt the input and write into output * * inputLength - size from the input to be encrypted (0 means to use the size of the vector)
*/
sal_uInt32 update(std::vector<sal_uInt8>& output, std::vector<sal_uInt8>& input,
sal_uInt32 inputLength = 0);
};
class COMPHELPER_DLLPUBLIC CryptoHash final : public Crypto
{
sal_Int32 mnHashSize;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.