StrataFrame Security Documentation Send comments on this topic.
Specifying the Encryption Key for User Data

Glossary Item Box

Specifying the Encryption Key for User Data

User data is stored within the SFSUsers database table using 3DES encryption. The key for the 3DES encryption is specified by using the SecurityBasics.SetSecurityKeyAndVectorForUserAuthentication() method. This method creates a hash of the given key and uses it at the System.Byte[] that is used for the encryption key and the initialization vector of the 3DES algorithm.

If you are deploying users as initial data to your application’s database (users that were created at design-time using the StrataFrame Role-based security editor), then the string value that is passed to the SetSecurityKeyAndVectorForUserAuthentication method must be the same value as that specified as the security key for the security project.

The SetSecurityKeyAndVectorForUserAuthentication method is generally called from the InitApplication() method within the AppMain.vb (Program.cs) file. The following sample illustrates the use of this method.

Sample - Calling SetSecurityKeyAndVectorForUserAuthentication() [Visual Basic]
Imports MicroFour.StrataFrame.Security.BusinessObjects
...
Private Shared Sub InitApplication(ByVal e As InitializingApplicationEventArgs)
	'-- Set the security key for the user data encryption
	SecurityBasics.SetSecurityKeyAndVectorForUserAuthentication("MyKey")
End Sub

Sample - Calling SetSecurityKeyAndVectorForUserAuthentication() [C#]
using MicroFour.StrataFrame.Security;
...
private static void InitApplication(InitializingApplicationEventArgs e)
{
	'-- Set the security key for the user data encryption
	SecurityBasics.SetSecurityKeyAndVectorForUserAuthentication("MyKey");
}