Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming

Reply
 
LinkBack Thread Tools
Old 02-21-07   #1 (permalink)
Programmer
 
MTPAPA121's Avatar
 
intel ati

Join Date: Feb 2007
Posts: 154

Rep: 2 MTPAPA121 Unknown
Unique Rep: 1
Trader Rating: 0
Default VB Password And Variables

How Do I use the password template??? and also how can i store variables like from the Masked Text Box???
__________________
Lovin My PS3
Playstation Network ID: MTPAPA121

System: 20" imac that isnt a lame PC
CPU
Intel Core 2 Duo
Motherboard
imac
Memory
3 GB
Graphics Card
Intel 945GM Express Chipset Controller
Hard Drive
250 GB
Sound Card
Built In
Power Supply
Wall
Case
imac
CPU cooling
stock
GPU cooling
ATI Radeon HD 2400
OS
Mac OS X 10.5.4
Monitor
20" LCD

Last edited by BFRD : 02-21-07 at 06:36 PM.
MTPAPA121 is offline   Reply With Quote
Old 02-21-07   #2 (permalink)
<= Humanaut
 
FrankenPC's Avatar
 
intel nvidia

Join Date: Jun 2006
Location: Bay Area
Posts: 5,548

Rep: 372 FrankenPC is a proven memberFrankenPC is a proven memberFrankenPC is a proven memberFrankenPC is a proven member
Unique Rep: 243
FAQs Submitted: 1
Trader Rating: 4
Default

For convenience, I store variables in INI files using 3DES encryption. I use the M$ crypto API.

Public Function Encrypt(ByVal strText As String, ByVal Key As String) As String

Dim byKey(1) As Byte
Dim IV() As Byte = {&H12, &H34, &H56, &H78, &H90, &HAB, &HCD, &HEF}

Try
byKey = System.Text.Encoding.UTF8.GetBytes(Left(Key, 7))

Dim des As New DESCryptoServiceProvider
Dim inputByteArray() As Byte = System.Text.Encoding.UTF8.GetBytes(strText)
Dim ms As New MemoryStream
Dim cs As New CryptoStream(ms, des.CreateEncryptor(byKey, IV), CryptoStreamMode.Write)

cs.Write(inputByteArray, 0, inputByteArray.Length)
cs.FlushFinalBlock()

Return Convert.ToBase64String(ms.ToArray())

Catch ex As Exception
MsgBox(ex.Message)
Return ""
End Try

End Function

Public Function Decrypt(ByVal strText As String, ByVal Key As String) As String

Dim byKey(1) As Byte
Dim IV() As Byte = {&H12, &H34, &H56, &H78, &H90, &HAB, &HCD, &HEF}
Dim inputByteArray(strText.Length) As Byte

Try
byKey = System.Text.Encoding.UTF8.GetBytes(Left(Key, 7))
Dim des As New DESCryptoServiceProvider
inputByteArray = Convert.FromBase64String(strText)
Dim ms As New MemoryStream
Dim cs As New CryptoStream(ms, des.CreateDecryptor(byKey, IV), CryptoStreamMode.Write)

cs.Write(inputByteArray, 0, inputByteArray.Length)
cs.FlushFinalBlock()

Dim encoding As System.Text.Encoding = System.Text.Encoding.UTF8

Return encoding.GetString(ms.ToArray())

Catch ex As Exception
MsgBox(ex.Message)
Return ""
End Try

End Function
__________________
Previous Member of Team Owners - 1st to hit 200k and 250K

Previous member of Rough Riders - 1st to hit 300k!!!

Adios everyone! I've been proud to be a member of Owners and Riders.

System: TITAN-2
CPU
Q6600 G0 @ 3.4GHZ
Motherboard
ASUS P5K-E
Memory
4GB GSkill DDR2-1000 CAS5
Graphics Card
BFG 8800GT OC
Hard Drive
340GB Raptor SATA II
Sound Card
SB X-FI
Power Supply
SilverStone 750W 4-rail
Case
Lian Li Mid-tower
CPU cooling
OCZ Vindicator
GPU cooling
Stock
OS
Vista Home Premium 32bit
Monitor
Sceptre 24" LCD
FrankenPC is offline Overclocked Account   Reply With Quote
Old 02-21-07   #3 (permalink)
Programmer
 
MTPAPA121's Avatar
 
intel ati

Join Date: Feb 2007
Posts: 154

Rep: 2 MTPAPA121 Unknown
Unique Rep: 1
Trader Rating: 0
Default

thank you
__________________
Lovin My PS3
Playstation Network ID: MTPAPA121

System: 20" imac that isnt a lame PC
CPU
Intel Core 2 Duo
Motherboard
imac
Memory
3 GB
Graphics Card
Intel 945GM Express Chipset Controller
Hard Drive
250 GB
Sound Card
Built In
Power Supply
Wall
Case
imac
CPU cooling
stock
GPU cooling
ATI Radeon HD 2400
OS
Mac OS X 10.5.4
Monitor
20" LCD
MTPAPA121 is offline   Reply With Quote
Old 02-21-07   #4 (permalink)
Programmer
 
MTPAPA121's Avatar
 
intel ati

Join Date: Feb 2007
Posts: 154

Rep: 2 MTPAPA121 Unknown
Unique Rep: 1
Trader Rating: 0
Default

bump
__________________
Lovin My PS3
Playstation Network ID: MTPAPA121

System: 20" imac that isnt a lame PC
CPU
Intel Core 2 Duo
Motherboard
imac
Memory
3 GB
Graphics Card
Intel 945GM Express Chipset Controller
Hard Drive
250 GB
Sound Card
Built In
Power Supply
Wall
Case
imac
CPU cooling
stock
GPU cooling
ATI Radeon HD 2400
OS
Mac OS X 10.5.4
Monitor
20" LCD
MTPAPA121 is offline   Reply With Quote
Old 02-21-07   #5 (permalink)
110100001101001111000
 
C-bro's Avatar
 
intel nvidia

Join Date: Jan 2006
Location: Hamilton, ON
Posts: 1,832

Rep: 283 C-bro is a proven memberC-bro is a proven memberC-bro is a proven member
Unique Rep: 215
FAQs Submitted: 6
Folding Team Rank: 237
Hardware Reviews: 9
Trader Rating: 1
Default

Quote:
Originally Posted by MTPAPA121 View Post
thaks but no thanks i dont understand your gayness
I was going to give you exactly what you needed until I read that. Insulting people who help you is not the way to get answers. Especially since your insult comes about from your own ignorance. Instead I'll give you the basic method for figuring out your problem:

http://www.google.com

System: RAID0R
CPU
Intel E2180 3.33GHz
Motherboard
Asus P5K-E/WIFI-AP vMod
Memory
2GB Kingmax DDR2-1066
Graphics Card
EVGA 8800GT
Hard Drive
2x250GB WD+500GB 7200.11
Sound Card
SB Audigy 2
Power Supply
Corsair CMPSU-550VX
CPU cooling
Arctic Cooling Freezer 7 Pro
GPU cooling
Zalman VF900-Cu
OS
Windows Vista Business 32-Bit
Monitor
HP F2105 21" & Samsung 712N
C-bro is offline I fold for Overclock.net Overclocked Account C-bro's Gallery   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools



All times are GMT -4. The time now is 02:12 PM.


Overclock.net is a Carbon Neutral Site Creative Commons License Internet Security By ControlScan

Terms of Service / Forum Rules | Privacy Policy | Advertising | Become an Official Vendor
Copyright © 2008 Shogun Interactive Development. Most rights reserved.
Page generated in 0.36035 seconds with 8 queries