Skip to content

ProofSystem/include/ProofSystem/AESEncryption.hpp

AES256 Encryption class file. More...

Classes

Name
class AESEncryption
Derived AES256 Encryption class.

Detailed Description

AES256 Encryption class file.

Date: 2024-01-05 Henrique A. Klein ([email protected])

Source code

#ifndef _AES_ENCRYPTION_HPP_
#define _AES_ENCRYPTION_HPP_

#include "ProofSystem/Encryption.hpp"

#include <nil/crypto3/block/algorithm/encrypt.hpp>
#include <nil/crypto3/block/algorithm/decrypt.hpp>
#include <nil/crypto3/block/aes.hpp>
#include <nil/crypto3/block/rijndael.hpp>

class AESEncryption : public Encryption
{

public:
    std::vector<std::uint8_t> EncryptData( std::vector<std::uint8_t> data, std::vector<std::uint8_t> key_data ) override
    {
        return nil::crypto3::encrypt<nil::crypto3::block::aes<256>>( data, key_data );
    }
    std::vector<std::uint8_t> DecryptData( std::vector<std::uint8_t> data, std::vector<std::uint8_t> key_data ) override
    {
        return nil::crypto3::decrypt<nil::crypto3::block::aes<256>>( data, key_data );
    }
    bool CheckEqual( const Encryption &lhs, const Encryption &rhs ) const override
    {
        return true;
    }
}

#endif

Updated on 2026-03-04 at 13:10:44 -0800