﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WebForms (How do I?)  » TripleDESWrapper</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 12:01:55 GMT</lastBuildDate><ttl>20</ttl><item><title>TripleDESWrapper</title><link>http://forum.strataframe.net/FindPost4454.aspx</link><description>What is the key to the encryption here when I use this wrapper?&lt;br&gt;
&lt;br&gt;
What will I need to move to my webserver upon deployment (thinking ahead) to maintain the ability to read encrypted data I deploy?&lt;br&gt;
&lt;br&gt;
I am using this (as below) to encrypt both database values for some sensitive information as well as parameters I pass to avoid the possibility of hack and SQL injection attacks. Am I using it correctly?&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
&lt;br&gt;
Keith&lt;br&gt;
&lt;br&gt;
sample implementation:&lt;br&gt;
        Dim x As String = "hhhh"&lt;br&gt;
        Dim encrypted_x As String&lt;br&gt;
        Dim decrypted_x As String&lt;br&gt;
&lt;br&gt;
        Dim wrapper As MicroFour.StrataFrame.Security.Encryption.TripleDESWrapper&lt;br&gt;
        wrapper = New MicroFour.StrataFrame.Security.Encryption.TripleDESWrapper&lt;br&gt;
&lt;br&gt;
        encrypted_x = wrapper.Encrypt(x)&lt;br&gt;
        decrypted_x = wrapper.Decrypt(encrypted_x)</description><pubDate>Tue, 14 Nov 2006 17:19:39 GMT</pubDate><dc:creator>Keith Chisarik</dc:creator></item><item><title>RE: TripleDESWrapper</title><link>http://forum.strataframe.net/FindPost4464.aspx</link><description>Excellent.....</description><pubDate>Tue, 14 Nov 2006 17:19:39 GMT</pubDate><dc:creator>Keith Chisarik</dc:creator></item><item><title>RE: TripleDESWrapper</title><link>http://forum.strataframe.net/FindPost4463.aspx</link><description>I generally have a shared class somewhere that defined these as constants.&amp;nbsp; This way I can reuse them more easily.&amp;nbsp; When it comes to high-level encryption and preventing any type of disassembler, I basically pre-encrypt as much information as possible.&lt;/P&gt;&lt;P&gt;In your case, I would just put the keys in a code file that is different than the one you are defining your encryption class.&amp;nbsp; That should be sufficient for most cases.</description><pubDate>Tue, 14 Nov 2006 17:17:31 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: TripleDESWrapper</title><link>http://forum.strataframe.net/FindPost4461.aspx</link><description>If it were you, would you put your keys in the code? or somewhere else?&lt;br&gt;
&lt;br&gt;
The project isn't for NASA or the government, just a financial institution, but I want to do things as "by the book" as possible just in case they ask and I don't want the headaches that we all know can result from "sensitive data" being obtained.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;</description><pubDate>Tue, 14 Nov 2006 17:09:32 GMT</pubDate><dc:creator>Keith Chisarik</dc:creator></item><item><title>RE: TripleDESWrapper</title><link>http://forum.strataframe.net/FindPost4458.aspx</link><description>No problem...:)</description><pubDate>Tue, 14 Nov 2006 16:49:52 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: TripleDESWrapper</title><link>http://forum.strataframe.net/FindPost4457.aspx</link><description>as always, thank you.</description><pubDate>Tue, 14 Nov 2006 16:48:38 GMT</pubDate><dc:creator>Keith Chisarik</dc:creator></item><item><title>RE: TripleDESWrapper</title><link>http://forum.strataframe.net/FindPost4456.aspx</link><description>Yes, this looks fine.&amp;nbsp; The only other thing that I would recommend is creating your own encryption key and vector rather than using the default keys.&amp;nbsp; If you notice, there is an overload on the New().&amp;nbsp; Use the second overload to provide the key and vector:&lt;/P&gt;&lt;P&gt;loDES = New TripleDESWrapper(New Integer() {24 values}, New Integer() {8 values})&lt;/P&gt;&lt;P&gt;The intellisense should give you some sample code on this.</description><pubDate>Tue, 14 Nov 2006 16:47:32 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>