nim - MD5 on an array, array[0..63, uint8] to cstring conversion -


i'm trying perform md5update on array[0..63, uint8] i'm getting

error: type mismatch: got (md5context, array[0..63, uint8], int) expected 1 of:  md5.md5update(c: var md5context, input: cstring, len: int) 

it seems wants ctring input , not buffer. how can perform md5update() on binary data? (i don't want null character @ end...)

you can cast buffer cstring cast[cstring](addr mybuf). note have pass var md5context, means has mutable (defined inside var or passed var parameter).


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -