home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / lcocxweb / samples.exe / EncDecrypt / EncDec.frm (.txt) next >
Encoding:
Visual Basic Form  |  1998-08-04  |  2.4 KB  |  80 lines

  1. VERSION 5.00
  2. Object = "{B190576C-254A-11D2-B61E-C80424DEEF17}#51.0#0"; "LCocx.ocx"
  3. Begin VB.Form frmEncDec 
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Encrypt/Decrypt"
  6.    ClientHeight    =   2496
  7.    ClientLeft      =   36
  8.    ClientTop       =   324
  9.    ClientWidth     =   3216
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   2496
  14.    ScaleWidth      =   3216
  15.    StartUpPosition =   3  'Windows Default
  16.    Begin LCocx98.LCocx LCocx1 
  17.       Left            =   1440
  18.       Top             =   1920
  19.       _ExtentX        =   656
  20.       _ExtentY        =   656
  21.    End
  22.    Begin VB.TextBox Text3 
  23.       Height          =   372
  24.       Left            =   240
  25.       TabIndex        =   4
  26.       Text            =   "Text3"
  27.       Top             =   1200
  28.       Width           =   2532
  29.    End
  30.    Begin VB.CommandButton cmddec 
  31.       Caption         =   "Dec"
  32.       Height          =   372
  33.       Left            =   1800
  34.       TabIndex        =   3
  35.       Top             =   1680
  36.       Width           =   972
  37.    End
  38.    Begin VB.CommandButton cmdenc 
  39.       Caption         =   "Enc"
  40.       Height          =   372
  41.       Left            =   240
  42.       TabIndex        =   2
  43.       Top             =   1680
  44.       Width           =   972
  45.    End
  46.    Begin VB.TextBox Text2 
  47.       Height          =   372
  48.       Left            =   240
  49.       TabIndex        =   1
  50.       Text            =   "Text2"
  51.       Top             =   720
  52.       Width           =   2532
  53.    End
  54.    Begin VB.TextBox Text1 
  55.       Height          =   372
  56.       Left            =   240
  57.       TabIndex        =   0
  58.       Text            =   "Text1"
  59.       Top             =   240
  60.       Width           =   2532
  61.    End
  62. Attribute VB_Name = "frmEncDec"
  63. Attribute VB_GlobalNameSpace = False
  64. Attribute VB_Creatable = False
  65. Attribute VB_PredeclaredId = True
  66. Attribute VB_Exposed = False
  67. Private Sub cmddec_Click()
  68. 'Decrypt a string and show it in a text box
  69. Text3 = LCocx1.Decrypt(Text2, "")
  70. 'Text3 = LCocx1.Decrypt(, "Encryption")
  71. 'Decrypt from the registry
  72. End Sub
  73. Private Sub cmdenc_Click()
  74. 'Encrypt without saving to the registry
  75. Text2 = LCocx1.Encrypt(Text1, "")
  76. 'Text2 = LCocx1.Encrypt(Text1, "Encryption")
  77. 'Encrypt saving to the registry "Encryption" is the name
  78. 'of the Value in which the encrypted string will be stored
  79. End Sub
  80.