Hexa format
    Werner Koch 
    wk at gnupg.org
       
    Mon Jan 30 12:46:21 CET 2006
    
    
  
On Sun, 29 Jan 2006 23:46:18 +0100, joel vennin said:
> hexa string representation. In fact, i'm using the gcry_md_hash_buffer
> function and i want to display on the screen the hexa representation
> of the digest buffer.
No, there is no such function. 
> I've got another question, i want to know what it is more efficient:
>   - use the gcry_md_hash_buffer function
>   - or use the set of functions:
>        - gcry_md_write
>        - gcry_md_read
That depends.  If you need to hash a string you are already holding
entirely and as one chunk in memory, gcry_md_hash_buffer is a bit more
effcient.  You should use this function only if you can hard wire the
digest algorithm (like SHA1) because the fucntion will abort the
process in case of an unknown digest algorithm.
Salam-Shalom,
   Werner
    
    
More information about the Gcrypt-devel
mailing list