public IVerifierFactory <A> CreateVerifierFactory <A>(A algorithmDetails) where A : IParameters <Algorithm>
            {
                Fips.FipsRsa.PssSignatureParameters pssParams = algorithmDetails as Fips.FipsRsa.PssSignatureParameters;
                if (pssParams != null)
                {
                    return((IVerifierFactory <A>) new VerifierFactory <Fips.FipsRsa.PssSignatureParameters>(pssParams, new Fips.FipsRsa.PssSignerProvider(pssParams, publicKey)));
                }

                Fips.FipsRsa.SignatureParameters sigParams = algorithmDetails as Fips.FipsRsa.SignatureParameters;

                return((IVerifierFactory <A>) new VerifierFactory <Fips.FipsRsa.SignatureParameters>(sigParams, new Fips.FipsRsa.SignerProvider(sigParams, publicKey)));
            }
Esempio n. 2
0
            public ISignatureFactory <A> CreateSignatureFactory <A>(A algorithmDetails) where A : IParameters <Algorithm>
            {
                CryptoServicesRegistrar.ApprovedModeCheck(approvedOnlyMode, "RSA");

                Fips.FipsRsa.PssSignatureParameters pssParams = algorithmDetails as Fips.FipsRsa.PssSignatureParameters;
                if (pssParams != null)
                {
                    return((ISignatureFactory <A>) new SignatureFactory <Fips.FipsRsa.PssSignatureParameters>(pssParams, new Fips.FipsRsa.PssSignerProvider(pssParams, privateKey)));
                }

                Fips.FipsRsa.SignatureParameters sigParams = algorithmDetails as Fips.FipsRsa.SignatureParameters;

                return((ISignatureFactory <A>) new SignatureFactory <Fips.FipsRsa.SignatureParameters>(sigParams, new Fips.FipsRsa.SignerProvider(sigParams, privateKey)));
            }