JCrypt - File encryption Program

Author Message
Parabellum

  • Total Posts : 233
  • Scores: 0
  • Reward points : 0
  • Joined: 11/12/2006
  • Location: UK
  • Status: offline
JCrypt - File encryption Program Tuesday, February 20, 2007 11:53 AM (permalink)
0
The complete product can be found here
http://www.jcrosse.net/jcrypt/JCrypt_1.0.1_setup.exe
 
The source files are here
http://www.jcrosse.net/jcrypt/source.zip
 
this program consists of a vbs file and multiple HTA's , which interface with the windows Crypto API using CAPICOM
I iwll post the code, however it has hard coded paths to exe files (which are the ciompiled hta's and vbscripts)
so you wont be able to just copy and paste...
the installer also creates registry keys (you can see in the innoSetup source file below) and registers the capicom.dll file
 
has GUI or cammand line interface
it writes conext menu entries so you can right-click any file and encryypt/decrypt
also supports dragging and droping of files on the Icon
writes environment variables so it can be run by simply typing Jcrypt in run or command prompt (although command line doesnt take affect till after reboot)
for full command line usage instructions run ---> jcrypt /?
 
sure i've forgotten loads... but just post if you have any questions.
It's been pretty well tested, and has lots of error handling in it too... but would be happy to hear of any suggestions, or bugs.
 
JCrypt.vbs(EXE)
 '########################################################################
 '#         #
 '# JCrypt - A vbs encryption program utilizing the CAPICOM  #
 '# ActiveX Interface to the Microsoft Windows Crypto API  #
 '# -------------------------------------------------------  #
 '# Author: Parabellum    #
 '# Date: 12th Feb 2007      #
 '#         #
 '########################################################################
 '========================================================================
 '========================================================================
 '
 '#####################################################
 '### Set Property values of EncryptedData.Algorithm
 '#####################################################
  
  Const CAPICOM_ENCRYPTION_ALGORITHM_RC2       = 0
  Const CAPICOM_ENCRYPTION_ALGORITHM_RC4       = 1
  Const CAPICOM_ENCRYPTION_ALGORITHM_DES       = 2
  Const CAPICOM_ENCRYPTION_ALGORITHM_3DES      = 3
  Const CAPICOM_ENCRYPTION_ALGORITHM_AES       = 4
  Const CAPICOM_ENCRYPTION_KEY_LENGTH_MAXIMUM  = 0
  Const CAPICOM_ENCRYPTION_KEY_LENGTH_40_BITS  = 1
  Const CAPICOM_ENCRYPTION_KEY_LENGTH_56_BITS  = 2
  Const CAPICOM_ENCRYPTION_KEY_LENGTH_128_BITS = 3
  Const CAPICOM_ENCRYPTION_KEY_LENGTH_192_BITS = 4
  Const CAPICOM_ENCRYPTION_KEY_LENGTH_256_BITS = 5
  
 '#####################################################
 '### <------------- MAIN SCRIPT ----------------->
 '#####################################################
 '
 '  DECLARE VARIABLES, OBJECTS etc..
 '---------------------------------------------------------------------
 Dim sourceData, strEncMethod, strSecret, strKey, strHashMethod
 Dim oStream, bFileData, crypt, strHash, bBuffer, cEnc, strMode
 Dim encryptedData, objFSO, ReadBinaryFile, dataToBeEncrypted
 Dim Buffer, decryptedData, oUtils, fso, ts, Binarray, WriteToFile
 Dim strFile, objAtribCheck, objShell, objFile, colEnvironmentVariables
 '---------------------------------------------------------------------
 Set objShell = CreateObject("WScript.Shell")
 Set objFSO = CreateObject("Scripting.FileSystemObject")
 Set args = WScript.Arguments
 Set colEnvironmentVariables = objShell.Environment("Volatile")
 envVarAPP = colEnvironmentVariables.Item("APPDATA")
 If objFSO.FileExists(envVarAPP & "\JCrypt\LOG.TXT") Then
  LOG_FILE = envVarAPP & "\JCrypt\LOG.TXT"
 Else
  If objFSO.FolderExists(envVarAPP & "\JCrypt") Then
   Set objFile = objFSO.CreateTextFile(envVarAPP & "\JCrypt\LOG.TXT", True)
   strLog = "JCrypt Log File [created:" & Now &  "]"
   objFile.WriteLine(strLog)
   objFile.Close
   LOG_FILE = envVarAPP & "\JCrypt\LOG.TXT"
  Else
   objFSO.CreateFolder(envVarAPP & "\JCrypt")
   Set objFile = objFSO.CreateTextFile(envVarAPP & "\JCrypt\LOG.TXT", True)
   strLog = "JCrypt Log File [created:" & Now & "]"
   objFile.WriteLine(strLog)
   objFile.Close
   LOG_FILE = envVarAPP & "\JCrypt\LOG.TXT"
  End If
 End If
 ArgCount = Args.Count
 Select Case ArgCount
  Case 0
   Call DisplayGUI
  Case 1
   set objFSO = CreateObject("Scripting.FileSystemObject")
   path = objFSO.GetAbsolutePathName(args.Item(0))
   strFile = path
   If objFSO.FolderExists(path) Then
    MsgBox "You have selected a folder." & vbNewLine & vbNewLine &  "Please select a file a try again"
    Call WriteToLog(Now & ": CANCELLED-> Folder selected. Please select a file and try again.")
    WScript.Quit
   ElseIf objFSO.FileExists(path) Then
    strFileName = objFSO.GetFileName(path)
    If Left(strFileName,5) = "$ENC_" Then
     Set wshShell=CreateObject("wscript.shell")
     strTitle = "Decrypt File?"
     strMsg = "The File " & path & " appears to be encrypted." & vbcrlf & vbcrlf & "Would you like to try and  decrypt it?"
     strAnswer = wshShell.Popup(strMsg,,strTitle,vbYesNo+vbQuestion)
     if strAnswer = vbYes then
       strFile = path
       Call checkFileAttributes(path)
       If objAtribCheck = "CONTINUE" Then      
        Call readSettings
        Call doMode("Decrypt")
        Call WriteToLog(Now & ": SUCCESS-> File " & strFile & "Decrypted")
       End If
     ElseIf strAnswer = vbNo Then
      Call WriteToLog(Now & ": CANCELLED-> Operation cancelled for file " & strFile)
      Wscript.Quit
     End If
    Else 
     Set wshShell=CreateObject("wscript.shell")
     strTitle = "Encrypt File?"
     strMsg = "The File " & path & "  doesn't appear to be encrypted." & vbcrlf & vbcrlf & "Would you like to Encrypt it?"
     strAnswer = wshShell.Popup(strMsg,,strTitle,vbYesNo+vbQuestion)
     if strAnswer = vbYes then
       strFile = path
       Call checkFileAttributes(path)
       If objAtribCheck = "CONTINUE" Then
        Call readSettings
        Call doMode("Encrypt")
        Call WriteToLog(Now & ": SUCCESS-> File " & strFile & " Encrypted")
       End If
     ElseIf strAnswer = vbNo Then
      Wscript.Quit
     End If
    End If
   Else
    Select Case args.Item(0)
     Case "/?"
      call displayUsage
     Case "SETUP"
      call displaySettings
     Case Else
      Call WriteToLog(Now & ": ERROR-> Syntax Error in command: " & args.Item(0))
      call displayUsage
    End Select
   End If
  Case Else
   Call parseArgs
   path = objFSO.GetAbsolutePathName(args.Item(0))
   Call checkFileAttributes(path)
   If objAtribCheck = "CONTINUE" Then
    Call readSettings
    Call doMode(strMode)
    Call WriteToLog(Now & ": SUCCESS-> File " & strFile & " " & strMode & "ed")
   End If
 End Select
 
 '____________________________________________________________________
 '#####################################################
 '# <------------- FUNCTIONS AND SUBS ---------------->
 '#####################################################
 '====================================================================
 '
 '#####################################################
 '### Read default Settings from Registry
 '#####################################################
 Function readSettings
  Set objShell = WScript.CreateObject("WScript.Shell")
  strAlg = objShell.RegRead("HKCU\Software\JCrypt\Settings\Defaults\DefaultAlgorithm")
  strKL = objShell.RegRead("HKCU\Software\JCrypt\Settings\Defaults\DefaultKeyLength")
  If Not IsNull(strAlg) Then
   Algorithm = strAlg
  Else
   Call displaySettings
  End If
  
  If Not IsNull(strKL) Then
   Algorithm = strAlg
  Else
   Call displaySettings
  End If
 End Function
 '#####################################################
 '### Select either Encrypt or Decrypt Mode
 '#####################################################
 Function doMode(mode)
  Select Case mode
   Case "Encrypt"
    Call LoadBinFile(strFile)
    strPassword = inputBox("Please enter password to encrypt the file")
    Call encryptData(dataToBeEncrypted,Algorithm,strPassword,KeyLength)
    Call SaveFile(strFile,encryptedData)
   Case "Decrypt"
    Call LoadFile(strFile)
    strPassword = inputBox("Please enter password to encrypt the file")
    Call decryptData(Buffer,Algorithm,strPassword,KeyLength)
    Call SaveBinFile(strFile,WriteToFile)
   Case Else
    MsgBox "An unknown syntax error has occured. Please check your command line arguments."
  End Select
 End Function
 '#####################################################
 '### Function to encrypt Data
 '#####################################################
 Function encryptData(sourceData,strEncMethod,strSecret,KeyLength)
  Set cEnc = CreateObject("CAPICOM.EncryptedData")
  cEnc.Algorithm = strEncMethod
  cEnc.Algorithm.KeyLength = KeyLength
  cEnc.SetSecret(strSecret)
  cEnc.Content = sourceData
  encryptedData = cEnc.Encrypt
 End Function
 '#####################################################
 '### Function to Decrypt Data
 '#####################################################
 Function decryptData(sourceData,strEncMethod,strSecret,KeyLength)
  Set oUtils = CreateObject("CAPICOM.Utilities")
  Set cEnc = CreateObject("CAPICOM.EncryptedData")
  cEnc.Algorithm = strEncMethod
  cEnc.Algorithm.KeyLength = KeyLength
  cEnc.SetSecret(strSecret)
  cEnc.Decrypt sourceData
  decryptedData = cEnc.Content
  WriteToFile = oUtils.BinaryStringToByteArray(decryptedData)
 End Function
 '#####################################################
 '### Open File and Read Data
 '#####################################################
 Function LoadFile(FileName)
  On Error Resume Next
  Set fso = CreateObject("Scripting.FileSystemObject")
     Set ts = fso.OpenTextFile(FileName)  
     Buffer = ts.ReadAll
  If IsNull(Buffer) Then
   MsgBox "This file Contains no data to Encrypt/Decrypt"
   Call WriteToLog(Now & ": ERROR-> The file " & FileName &  " Contains no data to Encrypt/Decrypt")
   wscript.quit
  End if
  ts.close
     Set fso = nothing
   If Err.Number <> 0 Then
   Call WriteToLog(Now & ": ERROR-> " & Err.Number & ": " &  Err.Description)
   Err.Clear
  End If
 End Function
 '#####################################################
 '### Open Binary File
 '#####################################################
 Function  LoadBinFile(FileName)   
  On Error Resume Next
  Set oUtils = CreateObject("CAPICOM.Utilities")
  Const adReadAll = -1
  Set oStream = WScript.CreateObject("ADODB.Stream")
  oStream.Open
  oStream.Type = 1  ' adTypeBinary
  oStream.LoadFromFile FileName
  bBuffer = oStream.Read(adReadAll)
  if IsNull(bBuffer) Then
   MsgBox "This file Contains no data to Encrypt/Decrypt"
   Call WriteToLog(Now & ": ERROR-> The file " & FileName &  " Contains no data to Encrypt/Decrypt")
   wscript.quit
  End if
  oStream.Close
  Set oStream = nothing
  dataToBeEncrypted = oUtils.ByteArrayToBinaryString(bBuffer)
  If Err.Number <> 0 Then
   Call WriteToLog(Now & ": ERROR-> " & Err.Number & ": " &  Err.Description)
   Err.Clear
  End If
 End Function
 '#####################################################
 '### Write Data back to File
 '#####################################################
 Function SaveFile(FileName,Buffer)
  On Error Resume Next
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set ts = fso.CreateTextFile(FileName, True)
  ts.Write Buffer
  ts.Close
  Set fso = nothing
  Call renameEncFile(strFile)
  If Err.Number <> 0 Then
   Call WriteToLog(Now & ": ERROR-> " & Err.Number & ": " &  Err.Description)
   Err.Clear
  End If
 End Function
 '#####################################################
 '### Write Data back to a Binary File
 '#####################################################
 Function SaveBinFile(FileName,Binarray)
  On Error Resume Next
  Const adSaveCreateOverWrite = 2
  Const adTypeBinary = 1
  Const adModeReadWrite = 3 
  Set oStream = CreateObject("ADODB.Stream")
  oStream.type = adTypeBinary
  oStream.mode = adModeReadWrite
  oStream.Open
  oStream.write Binarray
  oStream.SaveToFile FileName, adSaveCreateOverWrite
  oStream.Close
  Set oStream = nothing
  Call renameDecFile(strFile)
  If Err.Number <> 0 Then
   Call WriteToLog(Now & ": ERROR-> " & Err.Number & ": " &  Err.Description)
   Err.Clear
  End If
 End Function
 '#####################################################
 '### Rename the Decrypted File Removing the $Enc_
 '#####################################################
 Function renameDecFile(origName)
  On Error Resume Next
  Dim FolderPath, oldFileName, newFileName, objFSO
  Set objFSO = CreateObject("Scripting.FileSystemObject")
  FolderPath = objFSO.GetParentFolderName(origName)
  oldFileName = objFSO.GetFileName(origName)
  newFileName = FolderPath & "\" & Replace(oldFileName, "$ENC_","")
  objFSO.MoveFile origName , newFileName
  Set objFSO = nothing
  If Err.Number <> 0 Then
   Call WriteToLog(Now & ": ERROR-> " & Err.Number & ": " &  Err.Description)
   Err.Clear
  End If
 End Function
 '#####################################################
 '### Rename the Encrypted File starting with $Enc_
 '#####################################################
 Function renameEncFile(origName)
  On Error Resume Next
  Dim FolderPath, oldFileName, newFileName, objFSO
  Set objFSO = CreateObject("Scripting.FileSystemObject")
  oldFileName = objFSO.GetFileName(origName)
  FolderPath = objFSO.GetParentFolderName(origName)
  newFileName = FolderPath & "\$ENC_" & oldFileName
  objFSO.MoveFile origName , newFileName
  Set objFSO = nothing
  If Err.Number <> 0 Then
   Call WriteToLog(Now & ": ERROR-> " & Err.Number & ": " &  Err.Description)
   Err.Clear
  End If
 End Function
 '#####################################################
 '### Parse Command Line Arguments
 '#####################################################
 Function parseArgs()
  On Error Resume Next
  Set fso = CreateObject("Scripting.FileSystemObject")
  If fso.FileExists(args.Item(0)) Then
   strFile = args.Item(0)
  Else
   MsgBox "The file " & args.Item(0) & " was not found."
   call DisplayUsage
  End If
  
  Set colNamedArguments = WScript.Arguments.Named
  If colNamedArguments.Exists("M") Then
   optMode = colNamedArguments.Item("M")
   Select Case optMode
    Case "ENC"
     strMode = "Encrypt"
    Case "DEC"
     strMode = "Decrypt"
    Case Else
     MsgBox "Mode incorrectly Specified"
     Call WriteToLog(Now & ": ERROR-> Mode incorrectly specified")
     call DisplayUsage
   End Select
  Else
   MsgBox "Mode Not Specified"
   Call WriteToLog(Now & ": ERROR-> Mode Not Specified")
   call displayUsage
  End If
  
  If colNamedArguments.Exists("A") Then
   optAlgorithm = colNamedArguments.Item("A")
   Select Case optAlgorithm
    Case "RC2"
     Algorithm = CAPICOM_ENCRYPTION_ALGORITHM_RC2
    Case "RC4"
     Algorithm = CAPICOM_ENCRYPTION_ALGORITHM_RC4
    Case "DES"
     Algorithm = CAPICOM_ENCRYPTION_ALGORITHM_DES
    Case "3DES"
     Algorithm = CAPICOM_ENCRYPTION_ALGORITHM_3DES
    Case "AES"
     Algorithm = CAPICOM_ENCRYPTION_ALGORITHM_AES
    Case Else
     MsgBox "Unknown Algorithm: "  & optAlgorithm 
     Call WriteToLog(Now & ": ERROR-> Unknown Algorithm")
     Call displayUsage
   End Select
  End If
   
  If colNamedArguments.Exists("K") Then
   optKeyLength = colNamedArguments.Item("K")
   Select Case optKeyLength
    Case "MAX"
     KeyLength = CAPICOM_ENCRYPTION_KEY_LENGTH_MAXIMUM
    Case "40"
     KeyLength = CAPICOM_ENCRYPTION_KEY_LENGTH_40_BITS
    Case "56"
     KeyLength = CAPICOM_ENCRYPTION_KEY_LENGTH_56_BITS
    Case "128"
     KeyLength = CAPICOM_ENCRYPTION_KEY_LENGTH_128_BITS
    Case "192"
     KeyLength = CAPICOM_ENCRYPTION_KEY_LENGTH_192_BITS
    Case "256"
     KeyLength = CAPICOM_ENCRYPTION_KEY_LENGTH_256_BITS
    Case Else
     MsgBox "Unsupported KeyLength: "  & optKeyLength
     Call WriteToLog(Now & ": ERROR-> Unsupported KeyLength")
     Call displayUsage
   End Select
  End If
  If Err.Number <> 0 Then
   Call WriteToLog(Now & ": ERROR-> " & Err.Number & ": " &  Err.Description)
   Err.Clear
  End If
 End Function
 '#####################################################
 '### Check File Attributes
 '#####################################################
 Function checkFileAttributes(inFile)
  Set objFSO = CreateObject("Scripting.FileSystemObject")
  Set objFile = objFSO.GetFile(inFile) 
  If objFile.attributes and 1 Then 
   MsgBox "The file " & inFile & " is Read-Only." & vbNewLine & "Please change the Read-Only attribute and try again."
   Call WriteToLog(Now & ": ERROR-> The file " & inFile & " is Read-Only")
   WScript.Quit
  End If 
  
  If objFile.attributes and 4 Then 
   Warn = MsgBox("The file " & inFile & "is a system file. Do you wish to continue?" & _
    vbNewLine & "Encrypting a system file may cause you system to stop functioning", vbYesNo, "Perform on System File?") 
   If Warn = vbYes Then 
    Warn2 = MsgBox("Are you Sure??!!", vbYesNo, "System File?") 
    If Warn2 = vbYes Then 
     objAtribCheck = "CONTINUE"
    Else
     Call WriteToLog(Now & ": CANCELLED-> Operation cancled for file " & inFile)
     WScript.Quit
    End IF
   Else 
    Call WriteToLog(Now & ": CANCELLED-> Operation cancled for file " & inFile)
    WScript.Quit
   End If 
  End If 
  
  If objFile.attributes and 64 Then 
   Warn = MsgBox("The file " & inFile & "is a a Shortcut or Link to another file." & vbNewLine & _
    "Do you wish to Encrypt/Decrypt the file is points to?", vbYesNo, "Shortcut File?") 
   If Warn = vbYes Then 
    objAtribCheck = "CONTINUE"
   Else 
    Call WriteToLog(Now & ": CANCELLED-> Operation cancled for file " & inFile)
    WScript.Quit
   End If 
  End If 
  
  objAtribCheck = "CONTINUE"
  
  If Err.Number <> 0 Then
   Call WriteToLog(Now & ": ERROR-> " & Err.Number & ": " &  Err.Description)
   Err.Clear
  End If
 End Function
 '#####################################################
 '### Display Usage Information and Examples
 '#####################################################
 Function displayUsage
  Dim objShell
  Set objShell = CreateObject("WScript.Shell")
  objShell.Run(chr(34) & "C:\Program Files\JCrypt\Usage.exe" & chr(34))
  WScript.Quit 
 End Function
 '#####################################################
 '### Display Settings Dialog
 '#####################################################
 Function displaySettings
  Dim objShell
  Set objShell = CreateObject("WScript.Shell")
  objShell.Run(chr(34) & "C:\Program Files\JCrypt\config.exe" & chr(34))
  WScript.Quit 
 End Function
 '#####################################################
 '### Display GUI Interface
 '#####################################################
 Function DisplayGUI
  objShell.Run(chr(34) & "C:\Program Files\JCrypt\JCryptGUI.exe" & chr(34))
  WScript.Quit 
 End Function
 '#####################################################
 '### Write Progress to Log File
 '#####################################################
 Function WriteToLog(data)
  If Not objFSO.FileExists(LOG_FILE) Then
   Set objFile = objFSO.CreateTextFile(LOG_FILE)
   objFile.WriteLine "JCrypt (v1.0.1) Log File: Created : " & Now
   objFile.WriteLine data
   objFile.Close
  Else
   Set objFile = objFSO.OpenTextFile(LOG_FILE, 8)
   objFile.WriteLine data
   objFile.Close
  End If
 End Function 
 

 
JCryptGUI.hta(EXE)
 <html>
 <head>
  <title>JCrypt 1.0 - GUI Interface</title> 
  <hta:application
  applicationname="JCryptGUI" 
  caption="JCrypt GUI"
  contextmenu="no"
  icon="icon.ico"
  maximizebutton="no"
  minimizebutton="yes"
  navigable="yes"
  scroll="no"
  showintaskbar="yes"
  singleinstance="yes"
  sysmenu="yes"
  >
  <SCRIPT LANGUAGE="VBScript">
  
  Sub window_onload
         window.resizeTo 800,600
   
   Set objFSO = CreateObject("Scripting.FileSystemObject")
   Set objShell = CreateObject("WScript.Shell")
   Set colEnvironmentVariables = objShell.Environment("Volatile")
   envVarAPP = colEnvironmentVariables.Item("APPDATA")
   
   If objFSO.FileExists(envVarAPP & "\JCrypt\LOG.TXT") Then
    Set objFile = objFSO.OpenTextFile(envVarAPP & "\JCrypt\LOG.TXT", 1)
    strLog = objFile.ReadAll
    objFile.Close
   Else
    If objFSO.FolderExists(envVarAPP & "\JCrypt") Then
     Set objFile = objFSO.CreateTextFile(envVarAPP & "\JCrypt\LOG.TXT", True)
     strLog = "JCrypt Log File [created:" & Now &  "]"
     objFile.WriteLine(strLog)
     objFile.Close
    Else
     objFSO.CreateFolder(envVarAPP & "\JCrypt")
     Set objFile = objFSO.CreateTextFile(envVarAPP & "\JCrypt\LOG.TXT", True)
     strLog = "JCrypt Log File [created:" & Now & "]"
     objFile.WriteLine(strLog)
     objFile.Close
    End If
   End If
   
   document.JCryptGUI_Form.dataArea.value = strLog
   Set objFSO = Nothing
   Set objShell = Nothing
  End Sub
  
  Function changeSettings
   Set objShell = CreateObject("WScript.Shell")
   objShell.Run chr(34) & "C:\Program Files\JCrypt\Config.exe" & chr(34),0,True
   Location.Reload(True)
  End Function
  
  Function funcEncrypt
   strFile = document.JCryptGUI_Form.SelectFile.value
   Set objShell = CreateObject("WScript.Shell")
   objShell.Run chr(34) & "JCrypt" & chr(34) & " " & chr(34) & strFile & chr(34) & " /M:ENC",0,True
   document.JCryptGUI_Form.dataArea.value = ""
   Location.Reload(True)
  End Function
  Function funcDecrypt
   strFile = document.JCryptGUI_Form.SelectFile.value
   Set objShell = CreateObject("WScript.Shell")
   objShell.Run chr(34) & "JCrypt" & chr(34) & " " & chr(34) & strFile & chr(34) & " /M:DEC",0,True
   Location.Reload(True)
  End Function
  
  Function DeleteLog
   Set objShell = CreateObject("WScript.Shell")
   Set colEnvironmentVariables = objShell.Environment("Volatile")
   envVarAPP = colEnvironmentVariables.Item("APPDATA")
   set objFSO = CreateObject("Scripting.FileSystemObject")
   objFSO.DeleteFile(envVarAPP & "\JCrypt\LOG.TXT")
   Set objFile = objFSO.CreateTextFile(envVarAPP & "\JCrypt\LOG.TXT", True)
   strLog = "JCrypt Log File [created:" & Now & "]"
   objFile.WriteLine(strLog)
   objFile.Close
   Set objFSO = Nothing
   Location.Reload(True)
  End Function
  
  
     Sub PrintText
         strText = document.JCryptGUI_Form.dataArea.Value
         Set objFSO = CreateObject("Scripting.FileSystemObject")
         strFileName = "temporary_print_file.txt"
         Set objFile = objFSO.CreateTextFile(strFileName)
         objFile.Write strText
         objFile.Close
         Set objFile = objFSO.GetFile(strFileName)
         strPath = objFSO.GetParentFolderName(objFile)
         Set objShell = CreateObject("Shell.Application")
         Set objFolder = objShell.Namespace(strPath) 
         Set objFolderItem = objFolder.ParseName(strFileName)
         objFolderItem.InvokeVerbEx("Print")
     End Sub
  </script>
  
 </head>
 <body style="background-image: url('bg.jpg'); color: rgb(255, 255, 255); text-align: center">
 <div id="header">
  <h1 style="color: #ffffff; text-align: left;"><img src="lock.gif" style="vertical-align: middle;"> JCrypt v1.0
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  <input value="Change Default Settings" name="changeDefaultSettings" style="background-color: #113366; color: #ffffff; font-size: 12pt; font-weight: bold;" type="button" onClick="changeSettings">
  </h1>
  <hr />
 </div>
 <form name="JCryptGUI_Form">
 <h3>Select a file:&nbsp;&nbsp;&nbsp; <input value="" name="SelectFile" type="File" style="background-color: #113366; color: #ffffff; width: 550;"></h3>
  
   <input value="Encrypt" name="Encrypt" type="button" onClick="funcEncrypt" style="background-color: #113366; color: #ffffff; font-size: 12pt; font-weight: bold;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
   <input value="Decrypt" name="Decrypt" type="button" onClick="funcDecrypt" style="background-color: #113366; color: #ffffff; font-size: 12pt; font-weight: bold;"><br /><br />
   <textArea name="dataArea" style="width:750px; height:280px; background: #113366; border: 1px solid #ffffff; color: #ffffff; font-size: 8pt;"></textArea><br /><br />
   <input value="Close" name="Close Program" type="button" onClick="window.close" style="background-color: #113366; color: #ffffff; font-size: 12pt; font-weight: bold;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
   <input value="Print Log" name="PrintBtn" type="button" onClick="PrintText" style="background-color: #113366; color: #ffffff; font-size: 12pt; font-weight: bold;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
   <input value="Delete Log" name="PrintBtn" type="button" onClick="DeleteLog" style="background-color: #113366; color: #ffffff; font-size: 12pt; font-weight: bold;"><br>
   </form>
 <br /><br />
 <span id="DataArea"></span>
 </div>
 </body>
 </html>
 
 

 
Config.hta(exe)
 <html>
 <head>
  <title>JCrypt - Change Settings</title> 
  <hta:application
  applicationname="JCrypt_Settings" 
  caption="JCrypt Settings"
  contextmenu="no"
  maximizebutton="no"
  minimizebutton="yes"
  navigable="yes"
  scroll="no"
  showintaskbar="yes"
  singleinstance="yes"
  sysmenu="yes"
  >
  <SCRIPT LANGUAGE="VBScript">
  Sub window_onload
         window.resizeTo 520,600
  End Sub
  
  Sub SaveChanges
   Dim objFSO, objFile, strEncAlg, strKeyLength, objShell
   
   strEncAlg = document.Settings.setEncAlg.value
   strKeyLength = document.Settings.setKeyLength.value
   
   Set objShell = CreateObject("WScript.Shell")
   objShell.RegWrite "HKCU\Software\JCrypt\Settings\Defaults\DefaultAlgorithm", strEncAlg, "REG_SZ"
   objShell.RegWrite "HKCU\Software\JCrypt\Settings\Defaults\DefaultKeyLength", strKeyLength, "REG_SZ"
   Window.Close
  End Sub
  </script>
  
 </head>
 <body style="background: rgb(0, 20, 80); color: rgb(255, 255, 255);">
 <div style="border: 1px solid rgb(0, 0, 0); width: 480px; text-align: center;">
 <form name="Settings">
 <span style="font-weight: bold;">Change the Algorithm used to Encrypt your data</span><br>
   <br> 
   <select size="1" name="setEncAlg">
   <option value="CAPICOM_ENCRYPTION_ALGORITHM_RC2">RC2</option>
   <option value="CAPICOM_ENCRYPTION_ALGORITHM_RC4">RC4</option>
   <option Value="CAPICOM_ENCRYPTION_ALGORITHM_DES">DES</option>
   <option value="CAPICOM_ENCRYPTION_ALGORITHM_3DES">3DES</option>
   <option Value="CAPICOM_ENCRYPTION_ALGORITHM_AES" selected="selected">AES</option>
   </select>
   <br>
   <br>
   <span style="font-weight: bold;">
  Change the Default Key Length</span><br>
   <br>
   <select size="1" name="setKeyLength">
   <option value="CAPICOM_ENCRYPTION_KEY_LENGTH_MAXIMUM" selected="selected">MAX Supported</option>
   <option value="CAPICOM_ENCRYPTION_KEY_LENGTH_40_BITS">40 Bit</option>
   <option value="CAPICOM_ENCRYPTION_KEY_LENGTH_56_BITS">56 Bit</option>
   <option value="CAPICOM_ENCRYPTION_KEY_LENGTH_128_BITS">128 Bit</option>
   <option value="CAPICOM_ENCRYPTION_KEY_LENGTH_192_BITS">192 Bit</option>
   <option value="CAPICOM_ENCRYPTION_KEY_LENGTH_256_BITS">256 Bit</option>
   </select>
   <br>  <br>
   <small><span style="color: rgb(255, 0, 0);">
   <span style="font-weight: bold;">Warning!!!</span>
  - You can only decrypt files using the same combination of <br />
  encryption algorithm and key length as was used to originaly encrypt the data. <br />
  IF YOU CHANGE THESE SETTINGS, DO NOT FORGET THE COMBINATION <br />
  YOU HAVE USED!!!</span><br />
   <br />
   <span style="font-weight: bold;">Notes: The following enryption methods support the following
 size keys</span><br>
   </small>
   <div style="text-align: left;">
   <ul>
     <li><small>RC2: &nbsp;&nbsp; 128Bit</small></li>
     <li><small>RC4: &nbsp;&nbsp;&nbsp;128Bit</small></li>
     <li><small>DES: &nbsp;&nbsp; 56Bit</small></li>
     <li><small>3DES:&nbsp;&nbsp;168 bits (with parity bits 3DES;&nbsp;total storage length of 192 bits)</small></li>
     <li><small>AES: &nbsp;&nbsp;&nbsp;128, 192 or 256Bits</small><br></li>
   </ul>
   <span style="font-weight: bold;"></span></div>
   <small><span style="font-weight: bold; color: rgb(255, 0, 0);">
  IMPORTANT!!! - </span><span style="color: rgb(255, 0, 0);">Current
  US regulations set a maximum legal limit of 56Bit encryption, on all
  data exported from the US (I beleive this also includes data that
  passes through any US router) which would make the sending of any
  highly encrypted files, by email, a possible federal offence. This
  product is designed for local encryption, and care should be used when
  sending or transfering files to any other person or computer.</span></small><br>
   <br />
   <input value="Save Changes" name="Save" type="button" onClick="saveChanges()">
   <input value="Cancel" name="Cancel" type="button" onClick="window.close"><br>
 </form>
 </div>
 </body>
 </html>
 
 

 
usage.hta (exe)
 <html>
 <head>
   <title>JCrypt Usage</title>
   <hta:application applicationname="JCrypt_Usage" caption="JCrypt Usage" contextmenu="no" maximizebutton="no" minimizebutton="yes" navigable="yes" scroll="Auto" showintaskbar="yes" singleinstance="yes" sysmenu="yes"></hta:application>
   <script language="VBScript">
  Sub window_onload
         window.resizeTo 500,600
  End Sub
  </script>
 </head>
 <body>
 <small>&nbsp;&nbsp; &nbsp;<span style="font-weight: bold;">Usage:</span>&nbsp;&nbsp; &nbsp;<br>
 <br>
 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: rgb(51, 51, 255);">JCrypt FileName /M:mode [/A:Algorithm] [/K:KeyLength] /? SETUP</span><br>
 &nbsp;&nbsp; &nbsp;<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;filename&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Full path to file (eg: c:\temp\myfile.txt)<br>
 &nbsp;&nbsp; &nbsp;<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;SETUP&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; Display GUI to change default Settings<br>
 &nbsp;&nbsp; &nbsp;<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;/?&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; Display this Help
 information<br>
 &nbsp;&nbsp; &nbsp;<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;/M:ENC&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Set mode to Encrypt a file<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;/M:DEC&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Set mode to Decrypt a file<br>
 &nbsp;&nbsp; &nbsp;<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;/A:RC2&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;Use RC2 Encryption<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;/A:RC4&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; Use RC4 Encryption<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;/A:DES&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; Use DES Encryption<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;/A:3DES&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;Use Triple DES Encryption<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;/A:AES&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Use AES Encryption<br>
 &nbsp;&nbsp; &nbsp;<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;/K:MAX&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;Use Maximum Supported KeyLength<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;/K:40&nbsp;&nbsp;
 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; Use 40 Bit Key (RC2,RC4,DES and
 3DES)<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;/K:56&nbsp;&nbsp;
 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; Use 56 Bit Key (RC2,RC4,DES
 and 3DES)<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
 &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
 &nbsp;&nbsp;&nbsp; -
 Maximum Legal for US Export!<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;/K:128&nbsp;&nbsp; &nbsp;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use 128 Bit Key (RC2,RC4,3DES and AES)<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;/K:192&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp;Use 192 Bit Key (AES Only)<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;/K:256&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Use 256 Bit Key (AES only)<br>
 &nbsp;&nbsp; &nbsp;<br>
 &nbsp;&nbsp; &nbsp;<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<span style="font-weight: bold;">Notes:</span><br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;When You Encrypt a file using this product, it will be <br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;renamed with a $ENC_ Prefix.<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;When you decrypt the file it will be removed.<br>
 &nbsp;&nbsp; &nbsp;<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Also: /A and /K are optional switches If niether is specified,<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;the default option specified in the program settings file<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;is used. This can using the JCrypt SETUP command, or via the<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;GUI Interface by selecting the settings button.<br>
 &nbsp;&nbsp; &nbsp;<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: rgb(255, 0, 0);">&nbsp;<span style="font-weight: bold;">IMPORTANT:</span> </span><br style="color: rgb(255, 0, 0);">
 <span style="color: rgb(255, 0, 0);">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Current US regulations set a maximum legal limit of 56Bit</span><br style="color: rgb(255, 0, 0);">
 <span style="color: rgb(255, 0, 0);">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;encryption, on all data exported from the US (I beleive this</span><br style="color: rgb(255, 0, 0);">
 <span style="color: rgb(255, 0, 0);">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;also includes data that passes through any US router) which</span><br style="color: rgb(255, 0, 0);">
 <span style="color: rgb(255, 0, 0);">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;would make the sending of any highly encrypted files by email,</span><br style="color: rgb(255, 0, 0);">
 <span style="color: rgb(255, 0, 0);">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;a possible federal offence.</span><br style="color: rgb(255, 0, 0);">
 <span style="color: rgb(255, 0, 0);">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;This product is designed for local encryption, and care should</span><br style="color: rgb(255, 0, 0);">
 <span style="color: rgb(255, 0, 0);">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;be used when sending or transfering files to any other person</span><br style="color: rgb(255, 0, 0);">
 <span style="color: rgb(255, 0, 0);">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;or computer.</span><br style="color: rgb(255, 0, 0);">
 <span style="color: rgb(255, 0, 0);">&nbsp;&nbsp; &nbsp;</span><br style="color: rgb(255, 0, 0);">
 <span style="color: rgb(255, 0, 0);">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<span style="font-weight: bold;">WARNING!</span></span><br style="color: rgb(255, 0, 0);">
 <span style="color: rgb(255, 0, 0);">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;You can only decrypt files using the same combination of</span><br style="color: rgb(255, 0, 0);">
 <span style="color: rgb(255, 0, 0);">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;encryption algorithm and key length as was used to originaly</span><br style="color: rgb(255, 0, 0);">
 <span style="color: rgb(255, 0, 0);">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;encrypt the data. </span><br style="color: rgb(255, 0, 0);">
 <span style="color: rgb(255, 0, 0);">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;IF YOU CHANGE THESE SETTINGS, DO NOT FORGET THE<br>
  &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;COMBINATION YOU HAVE USED!!!</span><br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
 &nbsp;&nbsp; &nbsp;<br>
 &nbsp;&nbsp; &nbsp;<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<span style="font-weight: bold; color: rgb(0, 0, 0);">&nbsp;Examples:</span><br>
 &nbsp;&nbsp; &nbsp;<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Basic Encrypt of a file using default settings<br>
 &nbsp;&nbsp; &nbsp;<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<span style="color: rgb(51, 51, 255);">JCrypt c:\MyFolder\myfile.txt ENC</span><br>
 &nbsp;&nbsp; &nbsp;<br>
 &nbsp;&nbsp; &nbsp;<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Basic Decrypt of a file using default settings<br>
 &nbsp;&nbsp; &nbsp;<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: rgb(51, 51, 255);">&nbsp;JCrypt c:\MyFolder\$ENC_myfile.txt DEC</span><br>
 &nbsp;&nbsp; &nbsp;<br>
 &nbsp;&nbsp; &nbsp;<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Encrypt a file using DES encryption with a 56 Bit Key<br>
 &nbsp;&nbsp; &nbsp;<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<span style="color: rgb(51, 51, 255);">JCrypt c:\MyFolder\myfile.txt ENC /A:DES /K:56</span><br>
 &nbsp;&nbsp; &nbsp;<br>
 &nbsp;&nbsp; &nbsp;<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Display GUI to change the default settings<br>
 &nbsp;&nbsp; &nbsp;<br>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: rgb(51, 51, 255);">&nbsp;JCrypt SETUP</span></small>
 <br>
 <br>
 <div id="Print" style="text-align: center;"><input value="Print" onclick="print()" ;="" type="button"></div>
 </body>
 </html>
 
 

 
InnoSetup source
 ; Script generated by the Inno Setup Script Wizard.
 ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
 [Setup]
 AppName=JCrypt
 AppVerName=Jcrypt 1.0.1
 AppPublisher=Jon Crosse
 AppPublisherURL=http://www.jcrosse.net/jcrypt
 AppSupportURL=http://www.jcrosse.net/jcrypt
 AppUpdatesURL=http://www.jcrosse.net/jcrypt
 DefaultDirName={pf}\JCrypt
 DisableDirPage=yes
 DefaultGroupName=JCrypt
 OutputDir=C:\Users\Jon\Desktop
 OutputBaseFilename=JCrypt_1.0.1_setup
 SetupIconFile=
 Compression=lzma
 SolidCompression=yes
 [Languages]
 Name: "english"; MessagesFile: "compiler:Default.isl"
 [Tasks]
 Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
 [Files]
 Source: "M:\Scripts\JCrypt\Final\JCrypt.exe"; DestDir: "{app}"; Flags: ignoreversion
 Source: "M:\Scripts\JCrypt\Final\JCryptGUI.exe"; DestDir: "{app}"; Flags: ignoreversion
 Source: "M:\Scripts\JCrypt\Final\capicom.dll"; DestDir: "{app}"; Flags: ignoreversion
 Source: "M:\Scripts\JCrypt\Final\config.exe"; DestDir: "{app}"; Flags: ignoreversion
 Source: "M:\Scripts\JCrypt\Final\Usage.exe"; DestDir: "{app}"; Flags: ignoreversion
 ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
 [Icons]
 Name: "{group}\JCrypt"; Filename: "{app}\JCrypt.exe"
 Name: "{group}\{cm:UninstallProgram,JCrypt}"; Filename: "{uninstallexe}"
 Name: "{commondesktop}\JCrypt"; Filename: "{app}\JCrypt.exe"; Tasks: desktopicon
 [Registry]
 Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\JCrypt.exe"; ValueType: string; ValueName: ""; ValueData: "{app}\JCrypt.exe"; Flags: uninsdeletekey
 Root: HKCR; Subkey: "*\shell\JCrypt> Decrypt\Command"; ValueType: string; ValueName: ""; ValueData: """{app}\JCrypt"" ""%L"" /M:DEC"; Flags: uninsdeletekey
 Root: HKCR; Subkey: "*\shell\JCrypt> Encrypt\Command"; ValueType: string; ValueName: ""; ValueData: """{app}\JCrypt"" ""%L"" /M:ENC"; Flags: uninsdeletekey
 Root: HKCU; Subkey: "SOFTWARE\JCrypt\Settings\Defaults"; ValueType: string; ValueName: "DefaultAlgorithm"; ValueData: "CAPICOM_ENCRYPTION_ALGORITHM_AES"; Flags: uninsdeletekey
 Root: HKCU; Subkey: "SOFTWARE\JCrypt\Settings\Defaults"; ValueType: string; ValueName: "DefaultKeyLength"; ValueData: "CAPICOM_ENCRYPTION_KEY_LENGTH_MAXIMUM"; Flags: uninsdeletekey
 Root: HKU; Subkey: ".DEFAULT\SOFTWARE\JCrypt\Settings\Defaults"; ValueType: string; ValueName: "DefaultAlgorithm"; ValueData: "CAPICOM_ENCRYPTION_ALGORITHM_AES"; Flags: uninsdeletekey
 Root: HKU; Subkey: ".DEFAULT\SOFTWARE\JCrypt\Settings\Defaults"; ValueType: string; ValueName: "DefaultKeyLength"; ValueData: "CAPICOM_ENCRYPTION_KEY_LENGTH_MAXIMUM"; Flags: uninsdeletekey
 Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}";
 [Run]
 Filename: "{cmd}"; Parameters: "/C regsvr32 /s ""{app}\capicom.dll"""
 Filename: "{app}\JCrypt.exe"; Description: "{cm:LaunchProgram,JCrypt}"; Flags: nowait postinstall skipifsilent
 
 

 
 
 


[image]local://12554/B8A655705D0745A88F1F5C74F358F720.jpg[/image]
Attachment(s)Attachments are not available: Download requirements not met
 
#1
    Parabellum

    • Total Posts : 233
    • Scores: 0
    • Reward points : 0
    • Joined: 11/12/2006
    • Location: UK
    • Status: offline
    RE: JCrypt - File encryption Program Tuesday, February 20, 2007 11:54 AM (permalink)
    0
    more screen shots..

    [image]local://12554/46E4E487D6B247449AA624378C2EC1B2.jpg[/image]
    Attachment(s)Attachments are not available: Download requirements not met
     
    #2
      Parabellum

      • Total Posts : 233
      • Scores: 0
      • Reward points : 0
      • Joined: 11/12/2006
      • Location: UK
      • Status: offline
      RE: JCrypt - File encryption Program Tuesday, February 20, 2007 11:55 AM (permalink)
      0
      yet more screen shots..

      [image]local://12554/D00B67F6E0B5474B9E5E1B6E2AEDC0FA.jpg[/image]
      Attachment(s)Attachments are not available: Download requirements not met
       
      #3
        Parabellum

        • Total Posts : 233
        • Scores: 0
        • Reward points : 0
        • Joined: 11/12/2006
        • Location: UK
        • Status: offline
        RE: JCrypt - File encryption Program Tuesday, February 20, 2007 11:56 AM (permalink)
        0
        last one...

        [image]local://12554/B16EC9A2CF704958BB939C0AD1A5EEDA.jpg[/image]
        Attachment(s)Attachments are not available: Download requirements not met
         
        #4
          DiGiTAL.SkReAM

          • Total Posts : 1259
          • Scores: 7
          • Reward points : 0
          • Joined: 9/7/2005
          • Location: Clearwater, FL, USA
          • Status: offline
          RE: JCrypt - File encryption Program Wednesday, February 21, 2007 5:37 AM (permalink)
          0
          Quick tip:
           
          If you hold down the ALT button while hitting the Print Screen button, you will onyl capture the active window, not your entire screen.

          "Would you like to touch my monkey?" - Dieter (Mike Meyers)

          "It is better to die like a tiger, than to live like a pussy."
          -Master Wong, from Balls of Fury
           
          #5
            Parabellum

            • Total Posts : 233
            • Scores: 0
            • Reward points : 0
            • Joined: 11/12/2006
            • Location: UK
            • Status: offline
            RE: JCrypt - File encryption Program Wednesday, February 21, 2007 9:01 AM (permalink)
            0
            lol... cheers... didn't know that one..! :)
             
            #6
              4scriptmoni

              • Total Posts : 225
              • Scores: 0
              • Reward points : 0
              • Joined: 5/3/2007
              • Status: offline
              RE: JCrypt - File encryption Program Monday, June 18, 2007 5:40 AM (permalink)
              0
              I am trying to use just your functions.
              to encrypt and then decrypt
              is that possible?
              can you help me understand the parameters needed
              Function EncryptData(sourceData,strEncMethod,strSecret,KeyLength)
              sourceDATA is the only one i dont get it, would it be something random like the time. ?

              cheers,
              FF
              Enterprise Microsoft Scripts Exchange, Login/Logout Monitor,TS, Monitoring, Security, AD, etc... http://www.felipeferreira.net
               
              #7
                Parabellum

                • Total Posts : 233
                • Scores: 0
                • Reward points : 0
                • Joined: 11/12/2006
                • Location: UK
                • Status: offline
                RE: JCrypt - File encryption Program Wednesday, July 04, 2007 8:21 PM (permalink)
                0
                SourceData is the data you wish to encrypt... in my case i was reading a file into a Binary data stream, but you could simple use a string or a variable...
                 
                #8
                  TomRiddle

                  • Total Posts : 620
                  • Scores: 12
                  • Reward points : 0
                  • Joined: 2/7/2008
                  • Location: Australia
                  • Status: offline
                  Re:JCrypt - File encryption Program Saturday, March 13, 2010 2:09 AM (permalink)
                  0
                  Hi Parabellum,
                   
                  Do you still have those source files so I can check out your work?
                   
                  Cheers
                  -join([int[]][char[]]'Ut|jwXmjqq%Wzqjx'|%{[char]($_-5)})
                   
                  #9

                    Online Bookmarks Sharing: Share/Bookmark

                    Jump to:

                    Current active users

                    There are 0 members and 1 guests.

                    Icon Legend and Permission

                    • New Messages
                    • No New Messages
                    • Hot Topic w/ New Messages
                    • Hot Topic w/o New Messages
                    • Locked w/ New Messages
                    • Locked w/o New Messages
                    • Read Message
                    • Post New Thread
                    • Reply to message
                    • Post New Poll
                    • Submit Vote
                    • Post reward post
                    • Delete my own posts
                    • Delete my own threads
                    • Rate post

                    2000-2012 ASPPlayground.NET Forum Version 3.9