Clean & Better Encryption
This commit is contained in:
parent
f5a80adbc7
commit
2a00bb35e7
17 changed files with 640 additions and 367 deletions
|
|
@ -12,6 +12,8 @@ pub enum CodecError {
|
|||
ReservedCommunicationType(u16),
|
||||
#[error("Invalid encoding")]
|
||||
InvalidEncoding,
|
||||
#[error("Too many entries to encode")]
|
||||
TooManyEntries,
|
||||
#[error("Crypto failed: {0}")]
|
||||
CryptoFailed(String),
|
||||
}
|
||||
|
|
@ -69,6 +71,9 @@ pub enum CommunicationError {
|
|||
#[error("ParseCommunicationValue error")]
|
||||
ParseCommunicationValue,
|
||||
|
||||
#[error("Encode error")]
|
||||
Encode,
|
||||
|
||||
#[error("Parse Certificate error")]
|
||||
CertificateParseFailed,
|
||||
|
||||
|
|
@ -139,6 +144,9 @@ pub enum CommunicationError {
|
|||
#[error("ParseCommunicationValue error")]
|
||||
ParseCommunicationValue,
|
||||
|
||||
#[error("Encode error")]
|
||||
Encode,
|
||||
|
||||
#[error("Parse Certificate error")]
|
||||
CertificateParseFailed,
|
||||
|
||||
|
|
@ -182,6 +190,7 @@ impl PartialEq for CommunicationError {
|
|||
(Self::ConnectionLost, Self::ConnectionLost) => true,
|
||||
(Self::Quinn(_), Self::Quinn(_)) => true,
|
||||
(Self::ParseCommunicationValue, Self::ParseCommunicationValue) => true,
|
||||
(Self::Encode, Self::Encode) => true,
|
||||
(Self::CertificateParseFailed, Self::CertificateParseFailed) => true,
|
||||
(Self::CertificateLoadFailed, Self::CertificateLoadFailed) => true,
|
||||
(Self::ParseError(a), Self::ParseError(b)) => a == b,
|
||||
|
|
@ -213,6 +222,7 @@ impl PartialEq for CommunicationError {
|
|||
(Self::ClosedByPeer, Self::ClosedByPeer) => true,
|
||||
(Self::ConnectionLost, Self::ConnectionLost) => true,
|
||||
(Self::ParseCommunicationValue, Self::ParseCommunicationValue) => true,
|
||||
(Self::Encode, Self::Encode) => true,
|
||||
(Self::CertificateParseFailed, Self::CertificateParseFailed) => true,
|
||||
(Self::CertificateLoadFailed, Self::CertificateLoadFailed) => true,
|
||||
(Self::ParseError(a), Self::ParseError(b)) => a == b,
|
||||
|
|
|
|||
Loading…
Reference in a new issue