comparison libpurple/ciphers/des.c @ 31802:ca94413ccd0e

Named initializers and most other C99isms don't work in Visual C++ .NET 2005 in C mode. This is troublesome for Instantbird. This remedies the problem for the cipher code, which allows Instantbird's libpurple build to work again. committer: John Bailey <rekkanoryo@rekkanoryo.org>
author Florian Quèze <florian@instantbird.org>
date Sun, 13 Mar 2011 16:47:36 +0000
parents 2d3c1197f930
children
comparison
equal deleted inserted replaced
31801:0888025a3a5d 31802:ca94413ccd0e
458 g_free(des_context); 458 g_free(des_context);
459 des_context = NULL; 459 des_context = NULL;
460 } 460 }
461 461
462 static PurpleCipherOps DESOps = { 462 static PurpleCipherOps DESOps = {
463 .init = des_init, 463 NULL, /* Set option */
464 .uninit = des_uninit, 464 NULL, /* Get option */
465 .encrypt = des_encrypt, 465 des_init, /* init */
466 .decrypt = des_decrypt, 466 NULL, /* reset */
467 .set_key = des_set_key, 467 des_uninit, /* uninit */
468 NULL, /* set iv */
469 NULL, /* append */
470 NULL, /* digest */
471 des_encrypt, /* encrypt */
472 des_decrypt, /* decrypt */
473 NULL, /* set salt */
474 NULL, /* get salt size */
475 des_set_key, /* set key */
476 NULL, /* get key size */
477 NULL, /* set batch mode */
478 NULL, /* get batch mode */
479 NULL, /* get block size */
480 NULL /* set key with len */
468 }; 481 };
469 482
470 /****************************************************************************** 483 /******************************************************************************
471 * Triple-DES 484 * Triple-DES
472 *****************************************************************************/ 485 *****************************************************************************/
796 g_free(des3_context); 809 g_free(des3_context);
797 des3_context = NULL; 810 des3_context = NULL;
798 } 811 }
799 812
800 static PurpleCipherOps DES3Ops = { 813 static PurpleCipherOps DES3Ops = {
801 .init = des3_init, 814 NULL, /* Set option */
802 .uninit = des3_uninit, 815 NULL, /* Get option */
803 .set_iv = des3_set_iv, 816 des3_init, /* init */
804 .encrypt = des3_encrypt, 817 NULL, /* reset */
805 .decrypt = des3_decrypt, 818 des3_uninit, /* uninit */
806 .set_key = des3_set_key, 819 des3_set_iv, /* set iv */
807 .set_batch_mode = des3_set_batch, 820 NULL, /* append */
808 .get_batch_mode = des3_get_batch, 821 NULL, /* digest */
822 des3_encrypt, /* encrypt */
823 des3_decrypt, /* decrypt */
824 NULL, /* set salt */
825 NULL, /* get salt size */
826 des3_set_key, /* set key */
827 NULL, /* get key size */
828 des3_set_batch, /* set batch mode */
829 des3_get_batch, /* get batch mode */
830 NULL, /* get block size */
831 NULL /* set key with len */
809 }; 832 };
810 833
811 /****************************************************************************** 834 /******************************************************************************
812 * Registration 835 * Registration
813 *****************************************************************************/ 836 *****************************************************************************/