Mercurial > dropbear
comparison buffer.c @ 760:f336d232fc63 ecc
Make _sign and _verify functions take a buffer* rather than void* and int
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 06 Apr 2013 16:00:37 +0800 |
parents | a98a2138364a |
children | 7dcb46da72d9 |
comparison
equal
deleted
inserted
replaced
759:76fba0856749 | 760:f336d232fc63 |
---|---|
267 buf_putint(buf, len); | 267 buf_putint(buf, len); |
268 buf_putbytes(buf, str, len); | 268 buf_putbytes(buf, str, len); |
269 | 269 |
270 } | 270 } |
271 | 271 |
272 /* puts an entire buffer as a SSH string. ignore pos of buf_str. */ | |
273 void buf_putbufstring(buffer *buf, const buffer* buf_str) { | |
274 buf_putstring(buf, buf_str->data, buf_str->len); | |
275 } | |
276 | |
272 /* put the set of len bytes into the buffer, incrementing the pos, increasing | 277 /* put the set of len bytes into the buffer, incrementing the pos, increasing |
273 * len if required */ | 278 * len if required */ |
274 void buf_putbytes(buffer *buf, const unsigned char *bytes, unsigned int len) { | 279 void buf_putbytes(buffer *buf, const unsigned char *bytes, unsigned int len) { |
275 memcpy(buf_getwriteptr(buf, len), bytes, len); | 280 memcpy(buf_getwriteptr(buf, len), bytes, len); |
276 buf_incrwritepos(buf, len); | 281 buf_incrwritepos(buf, len); |