Lines Matching refs:Enc
474 Enc *enc;
486 enc = &newkey->enc;
490 /* Enc structure */
491 enc->name = buffer_get_string(&b, NULL);
492 buffer_get(&b, &enc->cipher, sizeof(enc->cipher));
493 enc->enabled = buffer_get_int(&b);
494 enc->block_size = buffer_get_int(&b);
495 enc->key = buffer_get_string(&b, &enc->key_len);
496 enc->iv = buffer_get_string(&b, &len);
497 if (len != enc->block_size)
499 enc->block_size, len);
501 if (enc->name == NULL || cipher_by_name(enc->name) != enc->cipher)
503 enc->name, enc->cipher);
533 Enc *enc;
544 enc = &newkey->enc;
549 /* Enc structure */
550 buffer_put_cstring(&b, enc->name);
552 buffer_append(&b, &enc->cipher, sizeof(enc->cipher));
553 buffer_put_int(&b, enc->enabled);
554 buffer_put_int(&b, enc->block_size);
555 buffer_put_string(&b, enc->key, enc->key_len);
556 packet_get_keyiv(mode, enc->iv, enc->block_size);
557 buffer_put_string(&b, enc->iv, enc->block_size);