Results 1 to 7 of 7

Thread: VB.NET & Java encryption compatibility problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2011
    Posts
    12

    VB.NET & Java encryption compatibility problem

    Thread to be deleted!
    Last edited by Gnosis101310; Jun 28th, 2011 at 03:02 AM.

  2. #2
    Master Of Orion ForumAccount's Avatar
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    2,802

    Re: VB.NET & Java encryption compatibility problem

    Your problem might be solved simply by placing Option Strict On at the top of your code file. Why do I say this? Because of your bit masking here:
    Code:
    (Chunks(1) & &HFF)
    This is not doing what you think it is doing. The ampersand in VB.NET is a concatenation operator most often used for the String type, the compiler is actually converting implicitly those values to strings so that it can concat them. The equalivent of the C-style ampersand for bitmasking in VB.NET is the keyword And
    Code:
    (Chunks(1) And &HFF)
    
    So you should fix that and see what you get.

    You should be setting Option Strict On to the default of all your projects and you can do this by navigating to Tools > Options > Projects and Solutions

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2011
    Posts
    12

    Re: VB.NET & Java encryption compatibility problem

    Thanks for the reply, I've now changed that and turned option explicit on, I still get an incorrect outcome

  4. #4
    Master Of Orion ForumAccount's Avatar
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    2,802

    Re: VB.NET & Java encryption compatibility problem

    option explicit on
    Option Strict On

  5. #5

    Thread Starter
    New Member
    Join Date
    Jun 2011
    Posts
    12

    Re: VB.NET & Java encryption compatibility problem

    Quote Originally Posted by ForumAccount View Post
    Option Strict On
    Yeah thats what I've done No other error appeared

  6. #6

    Thread Starter
    New Member
    Join Date
    Jun 2011
    Posts
    12

    Re: VB.NET & Java encryption compatibility problem

    Oh and incase it's needed, after changing the bit masking like ForumAccount said, This is the new outcome from VB.NET

    17 A4 45 87 8A 73 85 BC 50 C4 92 70 78 4E 46 D8 32 D1 27 E4 87 70 06 A6 D9 20 F3 87 68 91 14 11 D9 20 F3 87 68 91 14 11 D9 20 F3 87 68 91 14 11 D9 20 F3 87 68 91 14 11 15 42 40 B2 98 37 0F 91 82 CC FB 42 11 1A 71 E5

  7. #7
    Master Of Orion ForumAccount's Avatar
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    2,802

    Re: VB.NET & Java encryption compatibility problem

    Why is the main post edited?

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