Mercurial > dropbear
comparison 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 |
comparison
equal
deleted
inserted
replaced
763:f744321ac048 | 764:2202e854d187 |
---|---|
649 fprintf(stderr, " "); | 649 fprintf(stderr, " "); |
650 } | 650 } |
651 } | 651 } |
652 fprintf(stderr, "\n"); | 652 fprintf(stderr, "\n"); |
653 } | 653 } |
654 | |
655 void printmpint(const char *label, mp_int *mp) { | |
656 buffer *buf = buf_new(1000); | |
657 buf_putmpint(buf, mp); | |
658 printhex(label, buf->data, buf->len); | |
659 buf_free(buf); | |
660 | |
661 } | |
654 #endif | 662 #endif |
655 | 663 |
656 /* Strip all control characters from text (a null-terminated string), except | 664 /* Strip all control characters from text (a null-terminated string), except |
657 * for '\n', '\r' and '\t'. | 665 * for '\n', '\r' and '\t'. |
658 * The result returned is a newly allocated string, this must be free()d after | 666 * The result returned is a newly allocated string, this must be free()d after |