SlideShare uma empresa Scribd logo
1 de 5
Ketikkan Coding :
Imports Encryption.Crypto.Secret
Public Class Form1
'Reflects the index of the image
Private Enum Images
Encrypted = 0
Decrypted = 1
Folder_Open = 2
End Enum
#Region " Events"
#Region " Form Events"
Private Sub Form1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Me.btnEncrypt.Image = Me.ImageList1.Images(Images.Encrypted)
Me.btnDecrypt.Image = Me.ImageList1.Images(Images.Decrypted)
Me.btnOpenInput.Image = Me.ImageList1.Images(Images.Folder_Open)
Me.btnOpenOutput.Image = Me.ImageList1.Images(Images.Folder_Open)
End Sub
#End Region

'Form Events

#Region " Control Events"
Private Sub Open(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles btnOpenInput.Click
Dim btn As Button = DirectCast(sender, Button)
'The name of the TextBox to return the selected file path to is stored
' in the Tag property of the button.
Dim tb As TextBox = _
DirectCast(btn.Parent.Controls(btn.Tag.ToString()), TextBox)
Dim diag As New OpenFileDialog()
With diag
.CheckFileExists = True
.CheckPathExists = True
.Multiselect = False
.RestoreDirectory = True
.Title = "Please select an Input file"
.Filter = "All Files (*.*)|*.*"
.ShowDialog()
'Set the file path if one was selected
If .FileName.Trim() <> "" Then _
tb.Text = .FileName
End With
diag.Dispose()
End Sub

Private Sub Save(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnOpenOutput.Click
Dim btn As Button = DirectCast(sender, Button)
'The name of the TextBox to return the selected file path to is stored
' in the Tag property of the button.
Dim tb As TextBox = _
DirectCast(btn.Parent.Controls(btn.Tag.ToString()), TextBox)
Dim diag As New SaveFileDialog()
With diag
.AddExtension = True
.CheckFileExists = False
.CheckPathExists = True
.CreatePrompt = False
'Set the extension if there is an input file
If My.Computer.FileSystem.FileExists(Me.tbInput.Text.Trim()) = True Then
.DefaultExt = System.IO.Path.GetExtension(Me.tbInput.Text)
'Set the filter to whatever type of file was selected as an input file
.Filter = String.Concat(StrConv(.DefaultExt, VbStrConv.ProperCase), _
" Files (*.", .DefaultExt, ")|*.", .DefaultExt, _
"|All Files (*.*)|*.*")
Else
.Filter &= "All Files (*.*)|*.*"
End If
.OverwritePrompt = True
.RestoreDirectory = True
.Title = "Please enter an output file."
.ShowDialog()
If .FileName.Trim() <> "" Then _
tb.Text = .FileName
End With
diag.Dispose()
End Sub

Private Sub btnEncrypt_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnEncrypt.Click
'Get the reference to the button that was clicked
Dim clickedButton As Button = DirectCast(sender, Button)
'Call the EncryptDecrypt method and pass to it the Button that was clicked
EncryptDecrypt(clickedButton)
MessageBox.Show("Encryption complete!", "Encryption complete", _
MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub

Private Sub btnDecrypt_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnDecrypt.Click
'Get the reference to the button that was clicked
Dim clickedButton As Button = DirectCast(sender, Button)
'Call the EncryptDecrypt method and pass to it the Button that was clicked
EncryptDecrypt(clickedButton)
MessageBox.Show("Decryption complete!", "Decryption complete", _
MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub

Private Sub lblWikiLink_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles lblWikiLink.Click
System.Diagnostics.Process.Start(Me.lblWikiLink.Text)
End Sub

Private Sub RadioButton_CheckedChanged(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles
rbAes.CheckedChanged, rbTripleDes.CheckedChanged, rbRijndael.CheckedChanged,
rbRc2.CheckedChanged, rbDes.CheckedChanged
Dim enc As Encryption.Crypto.Secret._BaseEncryption = _
GetEncryptor()

tbSecretEncryptorDesc.Text = enc.Description
End Sub
#End Region

'Control Events

#End Region

'Events

#Region " Methods"
Private Sub EncryptDecrypt(ByVal clickedButton As Button)
'Create a new instance of the _BaseEncryption class,
' and get the appropriate encryptor class
Dim enc As Encryption.Crypto.Secret._BaseEncryption = _
GetEncryptor()
'Encrypt or Decrypt the selected file.
' (This will call the corresponding method in the actual class)
If clickedButton.Text = "Encrypt" Then
enc.Encrypt(Me.tbInput.Text.Trim(), Me.tbOutput.Text.Trim())
ElseIf clickedButton.Text = "Decrypt" Then
enc.Decrypt(Me.tbInput.Text.Trim(), Me.tbOutput.Text.Trim())
End If
End Sub

Private Function GetEncryptor() As _BaseEncryption
Dim enc As Encryption.Crypto.Secret._BaseEncryption = Nothing
Dim wikiLink As String = String.Empty
'Set the _BaseEncryption class to the class corresponding to the RadioButton
' that was clicked
Select Case True
Case Me.rbAes.Checked
enc = AES.Create()
wikiLink = "http://en.wikipedia.org/wiki/Advanced_Encryption_Standard"
Case Me.rbDes.Checked
enc = DES.Create()
wikiLink = "http://en.wikipedia.org/wiki/Data_Encryption_Standard"
Case Me.rbRc2.Checked
enc = Rc2.Create()
wikiLink = "http://en.wikipedia.org/wiki/RC2"
Case Me.rbRijndael.Checked
enc = Rijndael.Create()
wikiLink = "http://en.wikipedia.org/wiki/Rijndael_encryption_algorithm"
Case Me.rbTripleDes.Checked
enc = TripleDes.Create()
wikiLink = "http://en.wikipedia.org/wiki/Triple_DES"
End Select
Me.lblWikiLink.Text = wikiLink
Return enc
End Function
#End Region
End Class

'Methods

Mais conteúdo relacionado

Mais procurados

Chapter 11.5
Chapter 11.5Chapter 11.5
Chapter 11.5
sotlsoc
 
Código Opção Substituir
Código Opção SubstituirCódigo Opção Substituir
Código Opção Substituir
cymbron
 
Código Editor Net
Código Editor NetCódigo Editor Net
Código Editor Net
cymbron
 
Código Acerca Editor_Net
Código Acerca Editor_NetCódigo Acerca Editor_Net
Código Acerca Editor_Net
cymbron
 
Código fuente del software educativo
Código fuente del software educativoCódigo fuente del software educativo
Código fuente del software educativo
Leo Chavez Martinez
 
Ordenar vector
Ordenar vectorOrdenar vector
Ordenar vector
ecasteloc
 

Mais procurados (18)

Chapter 11.5
Chapter 11.5Chapter 11.5
Chapter 11.5
 
Trabajo de case
Trabajo de caseTrabajo de case
Trabajo de case
 
Código Opção Substituir
Código Opção SubstituirCódigo Opção Substituir
Código Opção Substituir
 
Código Editor Net
Código Editor NetCódigo Editor Net
Código Editor Net
 
Creating Ext GWT Extensions and Components
Creating Ext GWT Extensions and ComponentsCreating Ext GWT Extensions and Components
Creating Ext GWT Extensions and Components
 
Event handling in Java(part 2)
Event handling in Java(part 2)Event handling in Java(part 2)
Event handling in Java(part 2)
 
Java eventhandling
Java eventhandlingJava eventhandling
Java eventhandling
 
Trabajo de case
Trabajo de caseTrabajo de case
Trabajo de case
 
Código Acerca Editor_Net
Código Acerca Editor_NetCódigo Acerca Editor_Net
Código Acerca Editor_Net
 
Stop watch and array
Stop watch and arrayStop watch and array
Stop watch and array
 
Work flow
Work flowWork flow
Work flow
 
JAVA GUI PART III
JAVA GUI PART IIIJAVA GUI PART III
JAVA GUI PART III
 
Event handling in Java(part 1)
Event handling in Java(part 1)Event handling in Java(part 1)
Event handling in Java(part 1)
 
Lesson 07 Actions and Commands in WPF
Lesson 07 Actions and Commands in WPFLesson 07 Actions and Commands in WPF
Lesson 07 Actions and Commands in WPF
 
Código fuente del software educativo
Código fuente del software educativoCódigo fuente del software educativo
Código fuente del software educativo
 
Ordenar vector
Ordenar vectorOrdenar vector
Ordenar vector
 
CRUD VB2010
CRUD VB2010CRUD VB2010
CRUD VB2010
 
Código fuente del software educativo
Código fuente del software educativoCódigo fuente del software educativo
Código fuente del software educativo
 

Semelhante a Metode

Imports System.Net.Sockets Imports System.Text Public Class Form1 .pdf
  Imports System.Net.Sockets Imports System.Text Public Class Form1   .pdf  Imports System.Net.Sockets Imports System.Text Public Class Form1   .pdf
Imports System.Net.Sockets Imports System.Text Public Class Form1 .pdf
apnashop1
 
Elementos del lenguaje
Elementos del lenguajeElementos del lenguaje
Elementos del lenguaje
guest6473b8
 
1. Determine the output displayed when the button is clicked.Priva.docx
1. Determine the output displayed when the button is clicked.Priva.docx1. Determine the output displayed when the button is clicked.Priva.docx
1. Determine the output displayed when the button is clicked.Priva.docx
corbing9ttj
 
1. Determine the output displayed when the button is clicked. Priv.docx
1. Determine the output displayed when the button is clicked. Priv.docx1. Determine the output displayed when the button is clicked. Priv.docx
1. Determine the output displayed when the button is clicked. Priv.docx
corbing9ttj
 
Sistema de ventas
Sistema de ventasSistema de ventas
Sistema de ventas
DAYANA RETO
 
Sistemadeventas 100707084319-phpapp01
Sistemadeventas 100707084319-phpapp01Sistemadeventas 100707084319-phpapp01
Sistemadeventas 100707084319-phpapp01
mafv1976
 
Inventory management
Inventory managementInventory management
Inventory management
Rajeev Sharan
 

Semelhante a Metode (20)

Docimp
DocimpDocimp
Docimp
 
Imports System.Net.Sockets Imports System.Text Public Class Form1 .pdf
  Imports System.Net.Sockets Imports System.Text Public Class Form1   .pdf  Imports System.Net.Sockets Imports System.Text Public Class Form1   .pdf
Imports System.Net.Sockets Imports System.Text Public Class Form1 .pdf
 
VB net lab.pdf
VB net lab.pdfVB net lab.pdf
VB net lab.pdf
 
Elementos del lenguaje
Elementos del lenguajeElementos del lenguaje
Elementos del lenguaje
 
.net progrmming part4
.net progrmming part4.net progrmming part4
.net progrmming part4
 
1. Determine the output displayed when the button is clicked.Priva.docx
1. Determine the output displayed when the button is clicked.Priva.docx1. Determine the output displayed when the button is clicked.Priva.docx
1. Determine the output displayed when the button is clicked.Priva.docx
 
1. Determine the output displayed when the button is clicked. Priv.docx
1. Determine the output displayed when the button is clicked. Priv.docx1. Determine the output displayed when the button is clicked. Priv.docx
1. Determine the output displayed when the button is clicked. Priv.docx
 
Sistema de ventas
Sistema de ventasSistema de ventas
Sistema de ventas
 
Sistemadeventas 100707084319-phpapp01
Sistemadeventas 100707084319-phpapp01Sistemadeventas 100707084319-phpapp01
Sistemadeventas 100707084319-phpapp01
 
Colegio municipal
Colegio municipalColegio municipal
Colegio municipal
 
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITYDOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
 
Ensayo Convergencia Informatica
Ensayo Convergencia InformaticaEnsayo Convergencia Informatica
Ensayo Convergencia Informatica
 
Ete programs
Ete programsEte programs
Ete programs
 
Calculator code
Calculator codeCalculator code
Calculator code
 
C++ Windows Forms L10 - Instantiate
C++ Windows Forms L10 - InstantiateC++ Windows Forms L10 - Instantiate
C++ Windows Forms L10 - Instantiate
 
Inventory management
Inventory managementInventory management
Inventory management
 
Event Handling in JAVA
Event Handling in JAVAEvent Handling in JAVA
Event Handling in JAVA
 
Código fuente del software educativo
Código fuente del software educativoCódigo fuente del software educativo
Código fuente del software educativo
 
Androd Listeners
Androd ListenersAndrod Listeners
Androd Listeners
 
Puerto serialarduino
Puerto serialarduinoPuerto serialarduino
Puerto serialarduino
 

Último

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Último (20)

REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 

Metode

  • 1. Ketikkan Coding : Imports Encryption.Crypto.Secret Public Class Form1 'Reflects the index of the image Private Enum Images Encrypted = 0 Decrypted = 1 Folder_Open = 2 End Enum
  • 2. #Region " Events" #Region " Form Events" Private Sub Form1_Load(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles MyBase.Load Me.btnEncrypt.Image = Me.ImageList1.Images(Images.Encrypted) Me.btnDecrypt.Image = Me.ImageList1.Images(Images.Decrypted) Me.btnOpenInput.Image = Me.ImageList1.Images(Images.Folder_Open) Me.btnOpenOutput.Image = Me.ImageList1.Images(Images.Folder_Open) End Sub #End Region 'Form Events #Region " Control Events" Private Sub Open(ByVal sender As Object, _ ByVal e As System.EventArgs) Handles btnOpenInput.Click Dim btn As Button = DirectCast(sender, Button) 'The name of the TextBox to return the selected file path to is stored ' in the Tag property of the button. Dim tb As TextBox = _ DirectCast(btn.Parent.Controls(btn.Tag.ToString()), TextBox) Dim diag As New OpenFileDialog() With diag .CheckFileExists = True .CheckPathExists = True .Multiselect = False .RestoreDirectory = True .Title = "Please select an Input file" .Filter = "All Files (*.*)|*.*" .ShowDialog() 'Set the file path if one was selected If .FileName.Trim() <> "" Then _ tb.Text = .FileName End With diag.Dispose() End Sub Private Sub Save(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles btnOpenOutput.Click Dim btn As Button = DirectCast(sender, Button) 'The name of the TextBox to return the selected file path to is stored ' in the Tag property of the button.
  • 3. Dim tb As TextBox = _ DirectCast(btn.Parent.Controls(btn.Tag.ToString()), TextBox) Dim diag As New SaveFileDialog() With diag .AddExtension = True .CheckFileExists = False .CheckPathExists = True .CreatePrompt = False 'Set the extension if there is an input file If My.Computer.FileSystem.FileExists(Me.tbInput.Text.Trim()) = True Then .DefaultExt = System.IO.Path.GetExtension(Me.tbInput.Text) 'Set the filter to whatever type of file was selected as an input file .Filter = String.Concat(StrConv(.DefaultExt, VbStrConv.ProperCase), _ " Files (*.", .DefaultExt, ")|*.", .DefaultExt, _ "|All Files (*.*)|*.*") Else .Filter &= "All Files (*.*)|*.*" End If .OverwritePrompt = True .RestoreDirectory = True .Title = "Please enter an output file." .ShowDialog() If .FileName.Trim() <> "" Then _ tb.Text = .FileName End With diag.Dispose() End Sub Private Sub btnEncrypt_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles btnEncrypt.Click 'Get the reference to the button that was clicked Dim clickedButton As Button = DirectCast(sender, Button) 'Call the EncryptDecrypt method and pass to it the Button that was clicked EncryptDecrypt(clickedButton) MessageBox.Show("Encryption complete!", "Encryption complete", _ MessageBoxButtons.OK, MessageBoxIcon.Information) End Sub Private Sub btnDecrypt_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles btnDecrypt.Click 'Get the reference to the button that was clicked
  • 4. Dim clickedButton As Button = DirectCast(sender, Button) 'Call the EncryptDecrypt method and pass to it the Button that was clicked EncryptDecrypt(clickedButton) MessageBox.Show("Decryption complete!", "Decryption complete", _ MessageBoxButtons.OK, MessageBoxIcon.Information) End Sub Private Sub lblWikiLink_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles lblWikiLink.Click System.Diagnostics.Process.Start(Me.lblWikiLink.Text) End Sub Private Sub RadioButton_CheckedChanged(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles rbAes.CheckedChanged, rbTripleDes.CheckedChanged, rbRijndael.CheckedChanged, rbRc2.CheckedChanged, rbDes.CheckedChanged Dim enc As Encryption.Crypto.Secret._BaseEncryption = _ GetEncryptor() tbSecretEncryptorDesc.Text = enc.Description End Sub #End Region 'Control Events #End Region 'Events #Region " Methods" Private Sub EncryptDecrypt(ByVal clickedButton As Button) 'Create a new instance of the _BaseEncryption class, ' and get the appropriate encryptor class Dim enc As Encryption.Crypto.Secret._BaseEncryption = _ GetEncryptor() 'Encrypt or Decrypt the selected file. ' (This will call the corresponding method in the actual class) If clickedButton.Text = "Encrypt" Then enc.Encrypt(Me.tbInput.Text.Trim(), Me.tbOutput.Text.Trim()) ElseIf clickedButton.Text = "Decrypt" Then enc.Decrypt(Me.tbInput.Text.Trim(), Me.tbOutput.Text.Trim()) End If
  • 5. End Sub Private Function GetEncryptor() As _BaseEncryption Dim enc As Encryption.Crypto.Secret._BaseEncryption = Nothing Dim wikiLink As String = String.Empty 'Set the _BaseEncryption class to the class corresponding to the RadioButton ' that was clicked Select Case True Case Me.rbAes.Checked enc = AES.Create() wikiLink = "http://en.wikipedia.org/wiki/Advanced_Encryption_Standard" Case Me.rbDes.Checked enc = DES.Create() wikiLink = "http://en.wikipedia.org/wiki/Data_Encryption_Standard" Case Me.rbRc2.Checked enc = Rc2.Create() wikiLink = "http://en.wikipedia.org/wiki/RC2" Case Me.rbRijndael.Checked enc = Rijndael.Create() wikiLink = "http://en.wikipedia.org/wiki/Rijndael_encryption_algorithm" Case Me.rbTripleDes.Checked enc = TripleDes.Create() wikiLink = "http://en.wikipedia.org/wiki/Triple_DES" End Select Me.lblWikiLink.Text = wikiLink Return enc End Function #End Region End Class 'Methods