Re: End of String Character?



"Mike" <mbiang@xxxxxxxxxxxxx> wrote in message
news:1124917239.194113.24000@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Help, I am using an encryption routine that occasionally will encrypt a
> string using some extended ASCII characters (ASCII code > 128)
>
> I am wondering if there is a reserved character in VB that signifies
> the end of a string of characters.
>
> Here is what happens: I am encrypting certain fields before adding
> them to a SQL string. On occassion, the SQL string will simply end in
> the middle of the encrypted value.
>
> Example code
>
> sSQL = "EXEC SaveDetails " & _
> " @iDetailID = " & iDetailID & ", " & _
> " @sEncryptedText = '" & _
> replace(EncryptText(sText),"'","''") & "', " & _
> " @iOtherValue = 6"
>
> Normally Response.Write would print something like this:
>
> using Response.Write(Server.HTMLEncode(sSQL)):
>
> EXEC SaveDetails @iDetailID = 3, @sEncryptedText = 'aw@##@QASV@#AV (!',
> @iOtherValue = 6
>
> Occasionally on certain inputs for sEncryptedText it will print:
>
> EXEC SaveDetails @iDetailID = 3, @sEncryptedText = '@#DFVIDXZI
>
> Is my encryption algorithm possible generating a reserved character
> that signifies the end of a string? Does such a character exist in
> VBscript? Any help would be appreciated.
>
> FYI, I'd rather not post my encryption routine. Please let me know if
> you feel it would be necessary.
>

http://www.aspfaq.com/5003

Is your max 255?


.



Relevant Pages

  • Test for randomness
    ... Well I was testing my encryption routine for strengths and weaknesses. ... My first test was to verify the avalanche ability of it. ... program to test for randomness. ...
    (sci.crypt)
  • Re: How to use crypt and encrypton under debian 2.4
    ... ]> does someone knows how to set up crypt and encrypton on a debian ... It is hopelessly weak. ... Get a decent encryption routine. ...
    (comp.os.linux.security)
  • Re: encryption in .NET 2.0
    ... are the primary goals. ... However here the starting links of the encrypting methods in Net ... The reliability of the encryption routine and the easy of development ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Encrypting variables
    ... No matter what encryption routine he uses, he'll still have to store the ...
    (microsoft.public.vb.general.discussion)

Loading