Check cipher before writing metadata (LUKS2).
Some ciphers and key sizes created on-disk metadata that cannot be used. Use the same test for length-preserving cipher as LUKS1. Also check if key for integrity algorithm is not too small. Fixes #373.
Showing with 45 additions and 18 deletions