private void InitializeUsingAesGcm()
 {
     _keySizeIsValid   = new Lazy <bool>(ValidKeySize);
     _aesGcmObjectPool = new DisposableObjectPool <AesGcm>(CreateAesGcmInstance);
     EncryptFunction   = EncryptWithAesGcm;
     DecryptFunction   = DecryptWithAesGcm;
 }
 private void InitializeUsingAesCbc()
 {
     _authenticatedkeys          = new Lazy <AuthenticatedKeys>(CreateAuthenticatedKeys);
     _hmacAlgorithm              = GetHmacAlgorithm(Algorithm);
     _symmetricSignatureProvider = new Lazy <SymmetricSignatureProvider>(CreateSymmetricSignatureProvider);
     EncryptFunction             = EncryptWithAesCbc;
     DecryptFunction             = DecryptWithAesCbc;
 }