1*f319bb99SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*f319bb99SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*f319bb99SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*f319bb99SAndrew Rist * distributed with this work for additional information 6*f319bb99SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*f319bb99SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*f319bb99SAndrew Rist * "License"); you may not use this file except in compliance 9*f319bb99SAndrew Rist * with the License. You may obtain a copy of the License at 10*f319bb99SAndrew Rist * 11*f319bb99SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*f319bb99SAndrew Rist * 13*f319bb99SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*f319bb99SAndrew Rist * software distributed under the License is distributed on an 15*f319bb99SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*f319bb99SAndrew Rist * KIND, either express or implied. See the License for the 17*f319bb99SAndrew Rist * specific language governing permissions and limitations 18*f319bb99SAndrew Rist * under the License. 19*f319bb99SAndrew Rist * 20*f319bb99SAndrew Rist *************************************************************/ 21*f319bb99SAndrew Rist 22*f319bb99SAndrew Rist 23cdf0e10cSrcweir #ifndef _ENCRYPTION_DATA_HXX_ 24cdf0e10cSrcweir #define _ENCRYPTION_DATA_HXX_ 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include <com/sun/star/uno/Sequence.hxx> 27cdf0e10cSrcweir #include <cppuhelper/weak.hxx> 28cdf0e10cSrcweir 29cdf0e10cSrcweir class BaseEncryptionData : public cppu::OWeakObject 30cdf0e10cSrcweir { 31cdf0e10cSrcweir public: 32cdf0e10cSrcweir ::com::sun::star::uno::Sequence< sal_Int8 > m_aSalt; 33cdf0e10cSrcweir ::com::sun::star::uno::Sequence< sal_Int8 > m_aInitVector; 34cdf0e10cSrcweir ::com::sun::star::uno::Sequence< sal_Int8 > m_aDigest; 35cdf0e10cSrcweir sal_Int32 m_nIterationCount; 36cdf0e10cSrcweir BaseEncryptionData()37cdf0e10cSrcweir BaseEncryptionData() 38cdf0e10cSrcweir : m_nIterationCount ( 0 ){} 39cdf0e10cSrcweir BaseEncryptionData(const BaseEncryptionData & aData)40cdf0e10cSrcweir BaseEncryptionData( const BaseEncryptionData& aData ) 41cdf0e10cSrcweir : cppu::OWeakObject() 42cdf0e10cSrcweir , m_aSalt( aData.m_aSalt ) 43cdf0e10cSrcweir , m_aInitVector( aData.m_aInitVector ) 44cdf0e10cSrcweir , m_aDigest( aData.m_aDigest ) 45cdf0e10cSrcweir , m_nIterationCount( aData.m_nIterationCount ) 46cdf0e10cSrcweir {} 47cdf0e10cSrcweir }; 48cdf0e10cSrcweir 49cdf0e10cSrcweir class EncryptionData : public BaseEncryptionData 50cdf0e10cSrcweir { 51cdf0e10cSrcweir public: 52cdf0e10cSrcweir ::com::sun::star::uno::Sequence < sal_Int8 > m_aKey; 53cdf0e10cSrcweir sal_Int32 m_nEncAlg; 54cdf0e10cSrcweir sal_Int32 m_nCheckAlg; 55cdf0e10cSrcweir sal_Int32 m_nDerivedKeySize; 56cdf0e10cSrcweir sal_Int32 m_nStartKeyGenID; 57cdf0e10cSrcweir EncryptionData(const BaseEncryptionData & aData,const::com::sun::star::uno::Sequence<sal_Int8> & aKey,sal_Int32 nEncAlg,sal_Int32 nCheckAlg,sal_Int32 nDerivedKeySize,sal_Int32 nStartKeyGenID)58cdf0e10cSrcweir EncryptionData( const BaseEncryptionData& aData, const ::com::sun::star::uno::Sequence< sal_Int8 >& aKey, sal_Int32 nEncAlg, sal_Int32 nCheckAlg, sal_Int32 nDerivedKeySize, sal_Int32 nStartKeyGenID ) 59cdf0e10cSrcweir : BaseEncryptionData( aData ) 60cdf0e10cSrcweir , m_aKey( aKey ) 61cdf0e10cSrcweir , m_nEncAlg( nEncAlg ) 62cdf0e10cSrcweir , m_nCheckAlg( nCheckAlg ) 63cdf0e10cSrcweir , m_nDerivedKeySize( nDerivedKeySize ) 64cdf0e10cSrcweir , m_nStartKeyGenID( nStartKeyGenID ) 65cdf0e10cSrcweir {} 66cdf0e10cSrcweir EncryptionData(const EncryptionData & aData)67cdf0e10cSrcweir EncryptionData( const EncryptionData& aData ) 68cdf0e10cSrcweir : BaseEncryptionData( aData ) 69cdf0e10cSrcweir , m_aKey( aData.m_aKey ) 70cdf0e10cSrcweir , m_nEncAlg( aData.m_nEncAlg ) 71cdf0e10cSrcweir , m_nCheckAlg( aData.m_nCheckAlg ) 72cdf0e10cSrcweir , m_nDerivedKeySize( aData.m_nDerivedKeySize ) 73cdf0e10cSrcweir , m_nStartKeyGenID( aData.m_nStartKeyGenID ) 74cdf0e10cSrcweir {} 75cdf0e10cSrcweir }; 76cdf0e10cSrcweir 77cdf0e10cSrcweir #endif 78