storagehelper.cxx (dde7d3fa) storagehelper.cxx (49b34792)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 412 unchanged lines hidden (view full) ---

421}
422
423// ----------------------------------------------------------------------
424uno::Sequence< beans::NamedValue > OStorageHelper::CreatePackageEncryptionData( const ::rtl::OUString& aPassword, const uno::Reference< lang::XMultiServiceFactory >& xSF )
425{
426 // TODO/LATER: Should not the method be part of DocPasswordHelper?
427 uno::Sequence< beans::NamedValue > aEncryptionData;
428 sal_Int32 nSha1Ind = 0;
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 412 unchanged lines hidden (view full) ---

421}
422
423// ----------------------------------------------------------------------
424uno::Sequence< beans::NamedValue > OStorageHelper::CreatePackageEncryptionData( const ::rtl::OUString& aPassword, const uno::Reference< lang::XMultiServiceFactory >& xSF )
425{
426 // TODO/LATER: Should not the method be part of DocPasswordHelper?
427 uno::Sequence< beans::NamedValue > aEncryptionData;
428 sal_Int32 nSha1Ind = 0;
429 if ( aPassword.getLength() )
429 if ( !aPassword.isEmpty() )
430 {
431 // generate SHA256 start key
432 try
433 {
434 uno::Reference< lang::XMultiServiceFactory > xFactory = xSF.is() ? xSF : ::comphelper::getProcessServiceFactory();
435 if ( !xFactory.is() )
436 throw uno::RuntimeException();
437

--- 115 unchanged lines hidden ---
430 {
431 // generate SHA256 start key
432 try
433 {
434 uno::Reference< lang::XMultiServiceFactory > xFactory = xSF.is() ? xSF : ::comphelper::getProcessServiceFactory();
435 if ( !xFactory.is() )
436 throw uno::RuntimeException();
437

--- 115 unchanged lines hidden ---