StrataFrame Forum

Framework Functions

http://forum.strataframe.net/Topic13028.aspx

By Mike Thomas - 12/14/2007

Is there a doc that documents the callable functions provided by strataframe?  for example the screen capture and encryption functions/features mentioned on the feature page?

Thanks in advance

By Trent L. Taylor - 12/14/2007

You can find all of these through the class library.  Most of these are going to be in the Tools namespace (MicroFour.StrataFrame.Tools).  Common has a number of functions that do a wide spectrum of actions.  You can call the screen capture like this:

Dim myScreen As System.Drawing.Image = MicroFour.StrataFrame.Tools.ScreenCapture.CaptureScreen()
Dim myWindow As System.Drawing.Image = MicroFour.StrataFrame.Tools.ScreenCapture.CaptureWindow(Me.Handle)

Encryption gets a bit more technical, but we have a 3DES wrapper that can make it much easier.  You can also see an example of this in the CRM sample in the CreditCards BO.  The credit card gets encrypted to the database and the BO shows how to save and retrieve with the 3DES.  You will find this in the Security.Encryption namespace (MicroFour.StrataFrame.Security.Encryption).

Dim _3des As New MicroFour.StrataFrame.Security.Encryption.TripleDESWrapper()
Dim myString As String = _3des.Encrypt("Testing")

If you have any questions about any specific piece please let me know. Smile

By Keith Chisarik - 9/22/2008

Anything wrong with using your 3DES wrapper as is without messing with the key and vector? I guess that means that hypothetically another SF developer could reverse engineer it but.... pigs could fly too.

I just added the following field customization code for a simple password field, looks OK?

Dim _3des As New MicroFour.StrataFrame.Security.Encryption.TripleDESWrapper()

''' <summary>

''' smtppass

''' </summary>

''' <remarks></remarks>

<Browsable(False), _

BusinessFieldDisplayInEditor(), _

Description("smtppass"), _

DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _

Public Property [smtppass]() As System.String

Get

Dim x As String = CType(Me.CurrentRow.Item("smtppass"), System.String)

Return _3des.Decrypt(x)

End Get

Set(ByVal value As System.String)

Me.CurrentRow.Item("smtppass") = _3des.Encrypt(value)

End Set

End Property

By Trent L. Taylor - 9/23/2008

LOL...yeah, you nailed it.  There are times that I will use the standard vector key when it is not the absolute most critical information in the world for the extremely outside of the normal realm of possibility that another SF developer could reverse engineer.  Bu like you said, this is generally not going to be an issue.  Looks good.
By Keith Chisarik - 9/23/2008

OK thanks, if I have any security breaches in the future Tongue  I already knew where to look.... Ivan!
By Edhy Rijo - 9/23/2008

Keith Chisarik (09/23/2008)
OK thanks, if I have any security breaches in the future Tongue  I already knew where to look.... Ivan!

For some reason, I was just thinking about the same hacker BigGrin, sorry,  developer Hehe

By Trent L. Taylor - 9/23/2008

I guess we will have to put out an A.P.B for Ivan BigGrin
By Ivan George Borges - 9/23/2008

ROFL

I think it's time to change my name again...

Let me see which passport color I feel like having now...

Tongue