How to decode BASE64 ? Me have "cypher not found" at :
cbase64,crh: tsymciphercryptohandler; [...] crh:= tsymciphercryptohandler.create(nil); crh.ciphername:= 'aes-256-cbc'; // default digest is MD5 cbase64:= tsymciphercryptohandler.create(nil); cbase64.ciphername:= 'base64'; crh.key:= <<passw>>; s3:= cbase64.decrypt(OU); /// <<<< HERE s3:= crh.decrypt(s3);Me need to implement decoding algo from the attached file, the CMD file produces correct result.
================= The working BASE64 decoding procedure is :procedure Base64Decode(const s:string; const ostream:tstream; const base64mode: TBase64DecodingMode = bdmStrict);
var instream: tstringstream; Decoder : TBase64DecodingStream; begin instream:= tstringstream.create(s); decoder:=TBase64DecodingStream.create(instream,base64mode); try ostream.copyfrom(Decoder,Decoder.size); ostream.Position:=0; finally Decoder.Free; instream.free; end; end; ===============but its result is different tan one for in-place OPENSSL base-64-option (though BASE46 pass can be applied out of OPENSLL if urgently needed).
PS:1) how can me know that AES decoding succeeds in tstringlist.loadfromstream(encrypted tmsefilestream) - keyphrase, data integgity etc are OK? 2) is it correct to decode externally encoded contents, to set "tmsefilestream.cryptohandler" AFTER loading these contents via "tmsefilestream.copyfrom({stream},..)" ?
sl:= tstringlist.create; sl.loadfromstream({msefilestream}); showmessage(sl[0]); sl.free;
1.RAR
Description: application/rar-compressed
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk