コード例 #1
0
        public MFTestResults AnsiX923_Test()
        {
            bool bRes = true;

            try
            {
                AnsiX923 tester = new AnsiX923();

                using (Session sess = new Session("", MechanismType.AES_ECB))
                {
                    bRes &= tester.RunTests(sess, PaddingMode.ANSIX923);
                }

                if (m_isEmulator)
                {
                    using (Session sess = new Session("Emulator_Crypto", MechanismType.AES_ECB))
                    {
                        bRes &= tester.RunTests(sess, PaddingMode.ANSIX923);
                    }
                }
            }
            catch (NotSupportedException)
            {
                return MFTestResults.Skip;
            }
            catch (Exception e)
            {
                Log.Exception("", e);
                bRes = false;
            }
            return bRes ? MFTestResults.Pass : MFTestResults.Fail;
        }
コード例 #2
0
        public MFTestResults AnsiX923_Test()
        {
            bool bRes = true;

            try
            {
                AnsiX923 tester = new AnsiX923();

                using (Session sess = new Session("", MechanismType.AES_ECB))
                {
                    bRes &= tester.RunTests(sess, PaddingMode.ANSIX923);
                }

                if (m_isEmulator)
                {
                    using (Session sess = new Session("Emulator_Crypto", MechanismType.AES_ECB))
                    {
                        bRes &= tester.RunTests(sess, PaddingMode.ANSIX923);
                    }
                }
            }
            catch (NotSupportedException)
            {
                return(MFTestResults.Skip);
            }
            catch (Exception e)
            {
                Log.Exception("", e);
                bRes = false;
            }
            return(bRes ? MFTestResults.Pass : MFTestResults.Fail);
        }