Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #1579

Re: Encrypt/decrypt compatibility with Microsoft Crypto API?

From The Natural Philosopher <tnp@invalid.invalid>
Newsgroups comp.lang.php
Subject Re: Encrypt/decrypt compatibility with Microsoft Crypto API?
Date 2011-05-13 23:27 +0100
Organization albasani.net
Message-ID <iqkb9d$mrt$1@news.albasani.net> (permalink)
References <iqetjn$99q$2@dont-email.me> <iqf1pn$n8m$1@dont-email.me> <iqkaqr$5m4$1@dont-email.me>

Show all headers | View raw


Trevor wrote:
> On 5/11/2011 4:15 PM, JohnT wrote:
> 
>> When I did something similar, I wrote a C applet to do this.
>> You can't use standard tools because Windows pads the data differently.
>>
>> I used mcrypt with rijndael-128 and cbc
>> Has been working successfully for a number of years.
>>
>> In order to get it to work, I had to do the en/decryption both ways in
>> windows, and keep the data at each step, then replicate the data at the
>> linux side.
>>
>> I think the main issue is that on linux, the data is 0 padded.
>> On windows, the data is padded with a byte containing the length (in
>> bytes) of the padding.
> 
> I'm actually running the php site on a Windows server, but it looks like 
> the endian-ness may still be an issue.
> 
> The Windows program was made with PowerBuilder, and since PowerBuilder 
> is able to create .Net assemblies, and PHP is supposed to be able to use 
> .Net assemblies, I thought it might be easiest to use the existing code 
> and put it in an assembly.
> 
> Turns out PHP's support for .Net assemblies is not all that great. Yes, 
> the example at php.net for this functionality works, but as stated in 
> several stagnant bug reports, other objects within the same mscorlib.dll 
> assembly don't even work. Is is correct, as it appears, that development 
> on DOTNET has ceased, leaving it not very usable?
> 
> This has been one long week, with nothing really to show for it. :(
> 
> - Trevor
I fear that is most peoples experience if trying to mix Microsoft with 
anything else. It nearly always curdles...;-)


I spent a fruitless hour trying to get Word to understand any document I 
could produce 'cant open, out of memory'

Gave up and installed open office on the wife's Mac..

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Encrypt/decrypt compatibility with Microsoft Crypto API? Trevor <trevor@holyoak.com> - 2011-05-11 15:03 -0600
  Re: Encrypt/decrypt compatibility with Microsoft Crypto API? JohnT <john@example.com> - 2011-05-11 22:15 +0000
    Re: Encrypt/decrypt compatibility with Microsoft Crypto API? Trevor <trevorREMOVE@holyoak.com> - 2011-05-13 16:20 -0600
      Re: Encrypt/decrypt compatibility with Microsoft Crypto API? The Natural Philosopher <tnp@invalid.invalid> - 2011-05-13 23:27 +0100
        Re: Encrypt/decrypt compatibility with Microsoft Crypto API? Trevor <trevorREMOVE@holyoak.com> - 2011-05-17 11:38 -0600

csiph-web