Page 1 of 1

Protected Report Template

Posted: Tue Aug 04, 2009 1:25 pm
by johnham
I would like to protect a report template from being used arbitrarily. All I need is a password mechanism. This would be a simple addition to the StiReport Object like the following.

Add one overload to the SavePackedReport method that is a (string, string) like the following.

Code: Select all

void TheReport.SavePackedReport(string path, string password)
{
//Zip the output from SaveReport with a Zip File Password
//Save to file
}

void TheReport.SavePackedReport(Stream stream, string password)
{
//Zip the output from SaveReport with Zip File Password
//Output to Stream
}
The current overload list for this function is (string) and (Stream). So the two overloads I have provided would fit here nicely.

This method already uses a compression routine (ZIP) to compress the output from SaveReport. Most compression methods have a passwording/encryption system. This would provide a quick dirty method of protecting report designs from distribution and seems like a pretty simply addition to the Report Engine. Plus it would come in very handy for us.

Protected Report Template

Posted: Wed Aug 05, 2009 7:44 am
by Ivan
Hello,

This feature is already in our to-do list.

Thank you.

Protected Report Template

Posted: Thu Aug 06, 2009 3:33 pm
by johnham
Is it possible that this would be in the Aug 10 release?

:biggrin:


Protected Report Template

Posted: Mon Aug 10, 2009 3:00 am
by Andrew
Hello,

Libraries of compression do not support compression with the password. Therefore it is not such a simple task. Now we are examining a possibility of encryption using the RSA.

Thank you.

Protected Report Template

Posted: Mon Aug 10, 2009 3:16 pm
by johnham
We are currently using AES which outputs to a bytes array or a BASE64 String in other parts of our program. This has been super strong and super simple for us. If you guys need any help/source for this, I'd be happy to share.


Protected Report Template

Posted: Mon Aug 10, 2009 3:31 pm
by johnham
Along the ZIP Password front. If you are using the System.IO.Compression namespace then there is no good way to compress with a password. However... The following article and library (with source) has everything you need and was made by a member of the framework team at microsoft. It is freely distributed and has no restrictions or royalties. Also since it has source code you can integrated it right into the Stimulsoft codebase.

Here is the article that discusses it vs System.IO.Compression:
http://blogs.msdn.com/dotnetinterop/arc ... files.aspx

Here is the downloads for the library:
http://dotnetzip.codeplex.com/Release/P ... leaseFiles


This maybe a quicker and less complex way to provide protection than using RSA.

Protected Report Template

Posted: Fri Aug 21, 2009 3:33 am
by Jan
Hello John,

Please check build from 24 August. We have added new methods to StiReport:

Code: Select all

SaveEncryptedReport(Stream stream, string key)
SaveEncryptedReport(string path, string key)
SaveEncryptedReportToByteArray(string key)
SaveEncryptedReportToString(string key)
SaveEncryptedDocument(Stream stream, string key)
SaveEncryptedDocumentToString(string key)
LoadEncryptedReport(Stream stream, string key)
LoadEncryptedReport(string path, string key)
LoadEncryptedReportToByteArray(string key)
LoadEncryptedReportToString(string key)
LoadEncryptedDocument(Stream stream, string key)
LoadEncryptedDocumentToString(string key)
Thank you.