Results 1 to 2 of 2

Thread: If Only, Code Samples Worked...

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2000
    Posts
    57

    Encryption Is a *****

    I got a code sample to help me implement an encryption algorithm in my program and when the guy is setting up the key to get passed to the classfile.bkey property he uses this line of code. It won't compile and maybe one of you can tell me what he was trying to do?

    Dim bKey() as Byte
    Dim vKey as String
    vKey = Text1.Text
    ReDim bKey(Len(vKey) / 2 - 1)

    For I = 0 To ((Len(vKey) / 2) - 1)
    bKey(I) = CByte("&h" & Mid(vKey, ((I * 2) + 1), 2))
    next

    tooFsh.Bkey = bkey

    Notice that he is trying to put 4 characters into One Byte in a byte array - What the hell?? Any ideas??

    -Brad

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    I think the vKey string must be all numeric. No alpha characters allowed. Except for Hex characters A - F

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width