none
The Editor is the worst I've seen RRS feed

  • Question

  • And I have been here since these forums began.

    What use is the forum if one can not put code in it?

    Code put in, is largely distorted but not completely.

    Renee
    Tuesday, September 29, 2009 4:38 AM

Answers

All replies

  • Yes, this post editor is only usable in Firefox.  Copy and paste directly from Visual Studio, don't use Insert Code Block.

    Hans Passant.
    Tuesday, September 29, 2009 5:29 AM
  •     Private Sub BtnMakePad_Click(sender As System.Object, e As System.EventArgs) Handles BtnMakePad.Click
            Dim PadString As New System.Text.StringBuilder
            Dim Index As Integer = CBOPadFileSize.SelectedIndex
            Dim BaseSize As Integer
            OTP = ""
    
            If Index = 0 Then
                If TxtPlain.Text.Length = 0 Then
                    MessageBox.Show("Create Plain Text before creating an OTP based on plain text size", "Error", MessageBoxButtons.OK)
                    Exit Sub
                End If
                BaseSize = TxtPlain.Text.Length * MyRandom.Next(2, 4)
            Else
                BaseSize = 256 * 1024
                For i = 1 To Index - 1
                    BaseSize *= 2
                Next
            End If
            CipherPB.Value = 0
            CipherPB.Maximum = BaseSize
            For I = 1 To BaseSize
                PadString.Append(Master.Substring(MyRandom.Next(DontUseForPadChars, Master.Length - DontUseForPadChars), 1))
                If I Mod 10 = 0 And CBOPadFileSize.SelectedIndex <> 0 Then
                    CipherPB.Value = I
                End If
            Next
            OTP = PadString.ToString
            If OTP.Length > 256000 Then
                If MessageBox.Show("This pad is quite large (" & OTP.Length.ToString & " bytes), display it ?", "Make a choice", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
                    TxtPad.Text = OTP
                End If
            Else
                TxtPad.Text = OTP
            End If
        End Sub

    Just testing

    Wednesday, June 19, 2013 1:20 AM