private int GetIVLength() { if (encryptionIVSize == null) { // This will force detection of the iv size GetCryptoProvider(null); } return encryptionIVSize.Value; }