summaryrefslogtreecommitdiff
path: root/authenc.h
diff options
context:
space:
mode:
Diffstat (limited to 'authenc.h')
-rw-r--r--authenc.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/authenc.h b/authenc.h
index 8e460c77..a0dd5a1c 100644
--- a/authenc.h
+++ b/authenc.h
@@ -78,11 +78,14 @@ protected:
virtual void AuthenticateLastConfidentialBlock() {}
virtual void AuthenticateLastFooterBlock(byte *mac, size_t macSize) =0;
+ // State_AuthUntransformed: authentication is applied to plain text (Authenticate-then-Encrypt)
+ // State_AuthTransformed: authentication is applied to cipher text (Encrypt-then-Authenticate)
enum State {State_Start, State_KeySet, State_IVSet, State_AuthUntransformed, State_AuthTransformed, State_AuthFooter};
- State m_state;
- unsigned int m_bufferedDataLength;
- lword m_totalHeaderLength, m_totalMessageLength, m_totalFooterLength;
+
AlignedSecByteBlock m_buffer;
+ lword m_totalHeaderLength, m_totalMessageLength, m_totalFooterLength;
+ unsigned int m_bufferedDataLength;
+ State m_state;
};
NAMESPACE_END