Protected Report Template

Stimulsoft Reports.NET discussion
Post Reply
johnham
Posts: 98
Joined: Fri Sep 19, 2008 2:27 pm
Location: Richland, WA, USA

Protected Report Template

Post 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.
Thanks,
John Hamilton
Hamilton & Company, LLC
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Protected Report Template

Post by Ivan »

Hello,

This feature is already in our to-do list.

Thank you.
johnham
Posts: 98
Joined: Fri Sep 19, 2008 2:27 pm
Location: Richland, WA, USA

Protected Report Template

Post by johnham »

Is it possible that this would be in the Aug 10 release?

:biggrin:

Thanks,
John Hamilton
Hamilton & Company, LLC
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Protected Report Template

Post 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.
johnham
Posts: 98
Joined: Fri Sep 19, 2008 2:27 pm
Location: Richland, WA, USA

Protected Report Template

Post 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.

Thanks,
John Hamilton
Hamilton & Company, LLC
johnham
Posts: 98
Joined: Fri Sep 19, 2008 2:27 pm
Location: Richland, WA, USA

Protected Report Template

Post 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.
Thanks,
John Hamilton
Hamilton & Company, LLC
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Protected Report Template

Post 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.
Post Reply