diff options
author | Mikhail Voytenko <mav@openoffice.org> | 2011-03-09 17:29:09 +0100 |
---|---|---|
committer | Mikhail Voytenko <mav@openoffice.org> | 2011-03-09 17:29:09 +0100 |
commit | 7422ecbc2a6057dfcd4d2237da3f581965d270f3 (patch) | |
tree | 3fd61f6f4aac635e0a82151c34f15d4510c73204 /package/inc/EncryptionData.hxx | |
parent | c395e5608ce118f4296083632d6662f278f0b8fc (diff) |
mav60: #164341# support AES encryption
Diffstat (limited to 'package/inc/EncryptionData.hxx')
-rw-r--r-- | package/inc/EncryptionData.hxx | 48 |
1 files changed, 41 insertions, 7 deletions
diff --git a/package/inc/EncryptionData.hxx b/package/inc/EncryptionData.hxx index 66d74f739b9c..1182ee66e14b 100644 --- a/package/inc/EncryptionData.hxx +++ b/package/inc/EncryptionData.hxx @@ -30,14 +30,48 @@ #include <com/sun/star/uno/Sequence.hxx> #include <cppuhelper/weak.hxx> -class EncryptionData : public cppu::OWeakObject +class BaseEncryptionData : public cppu::OWeakObject { public: - // On export aKey holds the derived key - // On import aKey holds the hash of the user enterred key - com::sun::star::uno::Sequence < sal_Int8 > aKey; - com::sun::star::uno::Sequence < sal_uInt8 > aSalt, aInitVector, aDigest; - sal_Int32 nIterationCount; - EncryptionData(): nIterationCount ( 0 ){} + ::com::sun::star::uno::Sequence< sal_uInt8 > m_aSalt; + ::com::sun::star::uno::Sequence< sal_uInt8 > m_aInitVector; + ::com::sun::star::uno::Sequence< sal_uInt8 > m_aDigest; + sal_Int32 m_nIterationCount; + + BaseEncryptionData() + : m_nIterationCount ( 0 ){} + + BaseEncryptionData( const BaseEncryptionData& aData ) + : m_aSalt( aData.m_aSalt ) + , m_aInitVector( aData.m_aInitVector ) + , m_aDigest( aData.m_aDigest ) + , m_nIterationCount( aData.m_nIterationCount ) + {} }; + +class EncryptionData : public BaseEncryptionData +{ +public: + ::com::sun::star::uno::Sequence < sal_Int8 > m_aKey; + sal_Int32 m_nEncAlg; + sal_Int32 m_nCheckAlg; + sal_Int32 m_nDerivedKeySize; + + EncryptionData( const BaseEncryptionData& aData, const ::com::sun::star::uno::Sequence< sal_Int8 >& aKey, sal_Int32 nEncAlg, sal_Int32 nCheckAlg, sal_Int32 nDerivedKeySize ) + : BaseEncryptionData( aData ) + , m_aKey( aKey ) + , m_nEncAlg( nEncAlg ) + , m_nCheckAlg( nCheckAlg ) + , m_nDerivedKeySize( nDerivedKeySize ) + {} + + EncryptionData( const EncryptionData& aData ) + : BaseEncryptionData( aData ) + , m_aKey( aData.m_aKey ) + , m_nEncAlg( aData.m_nEncAlg ) + , m_nCheckAlg( aData.m_nCheckAlg ) + , m_nDerivedKeySize( aData.m_nDerivedKeySize ) + {} +}; + #endif |