in reply to Re^2: convert dotnet to perl
in thread convert dotnet to perl

Where are you getting these fields from in your Perl code? And what form are they in?


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco.
Rule 1 has a caveat! -- Who broke the cabal?

Replies are listed 'Best First'.
Re^4: convert dotnet to perl
by Anonymous Monk on Apr 21, 2005 at 21:41 UTC
    I'm not sure I understand your question. The initialization vector and key are from the dotnet code and looks like this:

    private static byte InitVect = { 11, 22, 33, 44, 55, 66, 77, 88}; private static byte CryptKey = { 99, 100, 101, 102, 103, 104, 105, 106 };

    (numbers changed for security)

    I tried doing a pack("b*",(11, 22, 33, 44, 55, 66, 77, 88)) but I'm not sure if that is what I need to do.

    Anybody know what I need to do with these?

      Okay. Then

      my $InitVec = pack 'C*', 11, 22, 33, 44, 55, 66, 77, 88; my $CryptKey = pack 'C*', 99, 100, 101, 102, 103, 104, 105, 106;

      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      Lingua non convalesco, consenesco et abolesco.
      Rule 1 has a caveat! -- Who broke the cabal?