[MSEide-MSEgui-talk] Is it possible to produce SHA256 digest with MSEgui ?
Like echo qwerty -n | sha256sum | awk '{print $1}' or echo -n qwerty | openssl dgst -sha256 do. -- 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
Re: [MSEide-MSEgui-talk] Is it possible to produce SHA256 digest with MSEgui ?
Like echo qwerty -n | sha256sum | awk '{print $1}' or echo -n qwerty | openssl dgst -sha256 do. Not yet. Use the EVP_Digest*() functions. From the OPENSL docs: //- New applications should use the SHA2 digest algorithms such as SHA256. The other digest algorithms are still in common use. For most applications the impl parameter to EVP_DigestInit_ex() will be set to NULL to use the default digest implementation. The functions EVP_DigestInit(), EVP_DigestFinal() and EVP_MD_CTX_copy() are obsolete but are retained to maintain compatibility with existing code. New applications should use EVP_DigestInit_ex(), EVP_DigestFinal_ex() and EVP_MD_CTX_copy_ex() because they can efficiently reuse a digest context instead of initializing and cleaning it up on each call and allow non default implementations of digests to be specified. In OpenSSL 0.9.7 and later if digest contexts are not cleaned up after use memory leaks will occur. //- -- 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
Re: [MSEide-MSEgui-talk] Is it possible to produce SHA256 digest with MSEgui ?
Opps, some bugs to fix : //- function ptr2digest(const adigestname: ansistring; const adata: pointer; const asize: cardinal):ansistring; var ctx:pEVP_MD_CTX; digest: pEVP_MD; md_len: integer; begin md_len:= 0; ctx:= pointer(EVP_MD_CTX_create); digest:= evp_get_digestbyname(pchar(adigestname)); if digest = nil then raise essl.create('Нет такого дайджеста: ' + adigestname); try EVP_DigestInit(ctx, digest); EVP_DigestUpdate(ctx, adata, asize {--size of adata--} ); setlength(result,EVP_MAX_MD_SIZE); EVP_DigestFinal(ctx, pcuchar(@result[1]), md_len); finally EVP_MD_CTX_destroy(ctx); setlength(result,md_len); end; end; -- 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