Mercurial > dropbear
diff dbutil.c @ 764:2202e854d187 ecc
add printmpint() for debugging
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 08 Apr 2013 23:12:35 +0800 |
parents | fc7ae88e63b3 |
children | 7dcb46da72d9 |
line wrap: on
line diff
--- a/dbutil.c Mon Apr 08 23:12:20 2013 +0800 +++ b/dbutil.c Mon Apr 08 23:12:35 2013 +0800 @@ -651,6 +651,14 @@ } fprintf(stderr, "\n"); } + +void printmpint(const char *label, mp_int *mp) { + buffer *buf = buf_new(1000); + buf_putmpint(buf, mp); + printhex(label, buf->data, buf->len); + buf_free(buf); + +} #endif /* Strip all control characters from text (a null-terminated string), except