+ free(m_int.wordv);
+
+ return r;
+}
+
+uint8_t ecdsa_sign_message(ecdsa_signature_t *s, const void *m, uint16_t m_len_b,
+ const hfdesc_t *hash_desc, const ecdsa_ctx_t *ctx,
+ const void *rand_in){
+
+ uint8_t *hash;
+ uint16_t hash_len = hfal_hash_getHashsize(hash_desc) / 8;
+ uint8_t r;
+
+
+ hash = malloc(hash_len);
+ if(hash == NULL){
+ return 1;
+ }
+ hfal_hash_mem(hash_desc, hash, m, m_len_b);
+ ecdsa_sign_hash(s, hash, hash_len, ctx, rand_in);
+