Changeset 559076c for functions.c
- Timestamp:
- Sep 15, 2008, 11:43:56 PM (16 years ago)
- Branches:
- master, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 7ba9ead9
- Parents:
- c194705
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
functions.c
r740d5f7 r559076c 422 422 mymsg=owl_zwrite_get_message(&z); 423 423 #ifdef OWL_ENABLE_ZCRYPT 424 cryptmsg=owl_malloc(strlen(mymsg)*4); 424 /* Allocate enough space for the crypted message. For each byte of 425 * the message, the encoded cyphertext will have two bytes. Block 426 * size is 8 bytes of input, or 16 bytes of output, so make sure we 427 * have at least one block worth of space allocated. If the message 428 * is empty, no blocks are sent, but we still allocate one 429 * block. The additional 16 bytes also provide space for the null 430 * terminator, as we will never use all of it for cyphertext. 431 */ 432 cryptmsg=owl_malloc((strlen(mymsg)*2)+16); 425 433 ret=owl_zcrypt_encrypt(cryptmsg, mymsg, owl_zwrite_get_class(&z), owl_zwrite_get_instance(&z)); 426 434 if (ret) { … … 428 436 owl_function_beep(); 429 437 owl_free(cryptmsg); 438 owl_zwrite_free(&z); 430 439 return; 431 440 }
Note: See TracChangeset
for help on using the changeset viewer.