Samson Engine Library

08/01/2013 01:18 .RazerX#1
Hello ElitePvpers

What's Samson Engine?
With Samson Engine You Can Easily Store Many Informations Like Strings Or
Files Into One File,While Everything Is Encrypted With A Key That You Define!
What's The Profits...?
Now You Dont Have To Use External Images Or Informations That Can Be Easily Edited. You Just Get Everything You Need From One Protected File.

How To Use?
A) Creating A Resource File

First Add The Samson Engine Library To Your Project
Then At The Beging Of The Code Add This:
Code:
Imports SamsonEngine
After That Create A Writer, For Example
Code:
Dim Writer As New Samson_Writer("Location", "Encryption Key")
To Add String Resources Just Use This Function:
Code:
Writer.Add("Resource_ID","Resource_Value")
To Add File Values Do This:
Code:
  Dim Image_Bytes As Byte() = My.Computer.FileSystem.ReadAllBytes("C:\Image.jpg")
Writer.Add("Image", Convert.ToBase64String(Image_Bytes))
To Create The Resource File Just Use This Function:
Code:
  If Writer.Generate = True Then
MsgBox("Done")
  Else
MsgBox(Writer.Get_Last_Error)
  End If
That's It!! You Have Succesfully Created A Resource File
Now To Read The Resources:

B) Reading A Resource File

First Add The Samson Engine Library To Your Project
Then At The Beging Of The Code Add This:
Code:
Imports SamsonEngine
After That Create A Reader, For Example
Code:
Dim Reader As New Samson_Reader("Location", "Encryption Key")
To Read A Value Just Use This Function:
Code:
Reader.Get_Value("Resource_Id")
For Example:
Code:
MsgBox(Reader.Get_Value("Server_Ip"))
Also You Can Use This Function For Image Resources:
Code:
Reader.Get_Image("Image_Id")
For_Example:
Code:
Me.BackgroundImage = Reader.Get_Image("BG_Image")
I Hope You Find My Library Usefull!



[Only registered and activated users can see links. Click Here To Register...]



Also The Source Code::rolleyes:
I Am Not A Perfect Programer I Am Sorry!

Find My Original Post Here:
[Only registered and activated users can see links. Click Here To Register...]
08/01/2013 03:46 xxfabbelxx#2
moved