コード例 #1
0
ファイル: FipsAes.cs プロジェクト: NDWX/BouncyCastle.FIPS
 public IAeadCipherBuilder <AuthenticationParametersWithIV> CreateAeadEncryptorBuilder(AuthenticationParametersWithIV parameters)
 {
     return(DoCreateAeadCipherBuilder(true, parameters));
 }
コード例 #2
0
ファイル: FipsAes.cs プロジェクト: NDWX/BouncyCastle.FIPS
            private IAeadCipherBuilder <AuthenticationParametersWithIV> DoCreateAeadCipherBuilder(bool forEncryption, AuthenticationParametersWithIV parameters)
            {
                IAeadBlockCipher cipher = ProviderUtils.CreateAeadCipher("FipsAES", parameters.Algorithm.Mode, parameters, forEncryption, aesEngineProvider);

                cipher.Init(forEncryption, new AeadParameters(null, parameters.MacSizeInBits, parameters.GetIV()));
                return(new AeadCipherBuilderImpl <AuthenticationParametersWithIV>(forEncryption, parameters, cipher));
            }
コード例 #3
0
ファイル: FipsAes.cs プロジェクト: NDWX/BouncyCastle.FIPS
            public IMacFactory <AuthenticationParametersWithIV> CreateMacFactory(AuthenticationParametersWithIV algorithmDetails)
            {
                IEngineProvider <IMac> macProvider = ProviderUtils.CreateMacProvider("FipsAES", algorithmDetails, aesEngineProvider);

                return(new MacFactory <AuthenticationParametersWithIV>(algorithmDetails, macProvider, (algorithmDetails.MacSizeInBits + 7) / 8));
            }