End of String Character?



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.

.



Relevant Pages

  • Need help to remove tbas, carriage retrun, and other!!!
    ... ASCII code of the character ... that I link to) to specify the string that you want to ... optionally the ascii chr number of the delimiter ... 'At the start point of the string (1 character after the ...
    (microsoft.public.access.queries)
  • Re: simple string encryption
    ... which seems to be a fast and small xor encryption algorithm. ... string into a textbox and then read the string from the textbox ... The reason is because strings in VB use two bytes per character and your code, as it stands, is messing about with both bytes of each character. ...
    (microsoft.public.vb.general.discussion)
  • Re: Encryption algorithm
    ... > character alphanumeric string in a COBOL program. ... consider these "obscuring" rather than "encryption", ... that you run the string through the same algorithm to encode and decode. ... This has the advantage of working with pretty much any character you'd ...
    (comp.lang.cobol)
  • Re: REWARD: chr() not working for Chinese "Locale"
    ... I have a routine that encrypts a string. ... >> value the encryption routine generated for each character, ... > into a string which is likely to survive whatever you throw at it. ... >> encryption routine tries to set a character to a value in this range, ...
    (microsoft.public.pocketpc.developer)
  • Re: Encrypt/decrypt problem
    ... I didn't mean I wanted to encrypt/decrypt Chinese character. ... alphanumeric but the encrypted string become 'alien' charater and no way to ... I also tried other encryption FLL but result was the same. ...
    (microsoft.public.fox.programmer.exchange)