uint8_t e3x_cipher_init(lob_t options) { e3x_cipher_default = NULL; memset(e3x_cipher_sets, 0, CS_MAX * sizeof(e3x_cipher_t)); e3x_cipher_sets[CS_1a] = cs1a_init(options); if(e3x_cipher_sets[CS_1a]) e3x_cipher_default = e3x_cipher_sets[CS_1a]; if(lob_get(options, "err")) return 1; e3x_cipher_sets[CS_2a] = cs2a_init(options); if(e3x_cipher_sets[CS_2a]) e3x_cipher_default = e3x_cipher_sets[CS_2a]; if(lob_get(options, "err")) return 1; e3x_cipher_sets[CS_3a] = cs3a_init(options); if(e3x_cipher_sets[CS_3a]) e3x_cipher_default = e3x_cipher_sets[CS_3a]; if(lob_get(options, "err")) return 1; return 0; }
uint8_t cipher3_init(lob_t options) { cipher3_default = NULL; memset(cipher3_sets, 0, CS_MAX * sizeof(cipher3_t)); cipher3_sets[CS_1a] = cs1a_init(options); if(cipher3_sets[CS_1a]) cipher3_default = cipher3_sets[CS_1a]; if(lob_get(options, "err")) return 1; cipher3_sets[CS_2a] = cs2a_init(options); if(cipher3_sets[CS_2a]) cipher3_default = cipher3_sets[CS_2a]; if(lob_get(options, "err")) return 1; cipher3_sets[CS_3a] = cs3a_init(options); if(cipher3_sets[CS_3a]) cipher3_default = cipher3_sets[CS_3a]; if(lob_get(options, "err")) return 1; return 0; }