StormByte C++ Library: Crypto module 0.0.9999
StormByte-Crypto is a StormByte library module for handling cryptographic operations
Loading...
Searching...
No Matches
generic.hxx
1#pragma once
2
3#include <StormByte/crypto/crypter/generic.hxx>
4#include <StormByte/crypto/keypair/generic.hxx>
5
10namespace StormByte::Crypto::Crypter {
15 class STORMBYTE_CRYPTO_PUBLIC Asymmetric: public Generic {
16 public:
21 Asymmetric(const Asymmetric& other) = default;
22
27 Asymmetric(Asymmetric&& other) noexcept = default;
28
32 virtual ~Asymmetric() noexcept = default;
33
39 Asymmetric& operator=(const Asymmetric& other) = default;
40
46 Asymmetric& operator=(Asymmetric&& other) noexcept = default;
47
52 KeyPair::Generic::PointerType KeyPair() const noexcept {
53 return m_keypair;
54 }
55
56 protected:
57 KeyPair::Generic::PointerType m_keypair;
58
64 inline Asymmetric(enum Type type, KeyPair::Generic::PointerType keypair):
65 Generic(type), m_keypair(keypair) {}
66
72 inline Asymmetric(enum Type type, const KeyPair::Generic& keypair):
73 Generic(type), m_keypair(keypair.Clone()) {}
74
80 inline Asymmetric(enum Type type, KeyPair::Generic&& keypair):
81 Generic(type), m_keypair(keypair.Move()) {}
82 };
83
90 STORMBYTE_CRYPTO_PUBLIC Generic::PointerType Create(enum Type type, KeyPair::Generic::PointerType keypair) noexcept;
91
98 STORMBYTE_CRYPTO_PUBLIC Generic::PointerType Create(enum Type type, const KeyPair::Generic& keypair) noexcept;
99
106 STORMBYTE_CRYPTO_PUBLIC Generic::PointerType Create(enum Type type, KeyPair::Generic&& keypair) noexcept;
107}
A generic asymmetric crypter class.
Definition generic.hxx:15
Asymmetric(enum Type type, const KeyPair::Generic &keypair)
Constructor.
Definition generic.hxx:72
Asymmetric(Asymmetric &&other) noexcept=default
Move constructor.
Asymmetric(const Asymmetric &other)=default
Copy constructor.
Asymmetric(enum Type type, KeyPair::Generic &&keypair)
Constructor.
Definition generic.hxx:80
virtual ~Asymmetric() noexcept=default
Virtual destructor.
KeyPair::Generic::PointerType m_keypair
The password used for asymmetric encryption.
Definition generic.hxx:57
Asymmetric(enum Type type, KeyPair::Generic::PointerType keypair)
Constructor.
Definition generic.hxx:64
A generic crypter class.
Definition generic.hxx:32
A generic class.
Definition generic.hxx:34
The namespace containing all the keypair-related classes.