示例#1
0
    static Boolean Test()
    {
        Boolean bResult;

        Console.WriteLine("Testing AesManaged encrypt/decrypt...");
        AesManaged     aes = new AesManaged();
        EncDec      ed = new EncDec();
        EncDecMul   edm = new EncDecMul();

        bResult = ed.TestAlgorithm(aes);
        bResult = edm.TestAlgorithm(aes) && bResult;

        if (AesCSPSupported())
		{
			Console.WriteLine("Testing AesCryptoServiceProvider encrypt/decrypt...");
			AesCryptoServiceProvider     aescsp = new AesCryptoServiceProvider();
			ed = new EncDec();
			edm = new EncDecMul();

			bResult = ed.TestAlgorithm(aescsp);
			bResult = edm.TestAlgorithm(aescsp) && bResult;
		}

        return bResult;
    }
示例#2
0
    static Boolean Test()
    {
        Boolean bResult;

        Console.WriteLine("Testing AesManaged encrypt/decrypt...");
        AesManaged aes = new AesManaged();
        EncDec     ed  = new EncDec();
        EncDecMul  edm = new EncDecMul();

        bResult = ed.TestAlgorithm(aes);
        bResult = edm.TestAlgorithm(aes) && bResult;

        if (AesCSPSupported())
        {
            Console.WriteLine("Testing AesCryptoServiceProvider encrypt/decrypt...");
            AesCryptoServiceProvider aescsp = new AesCryptoServiceProvider();
            ed  = new EncDec();
            edm = new EncDecMul();

            bResult = ed.TestAlgorithm(aescsp);
            bResult = edm.TestAlgorithm(aescsp) && bResult;
        }

        return(bResult);
    }
示例#3
0
    static Boolean Test()
    {
        Boolean bResult;

        Console.WriteLine("Testing RijndaelManaged encrypt/decrypt...");
        RijndaelManaged     rijnd = new RijndaelManaged();
        EncDec      ed = new EncDec();
        EncDecMul   edm = new EncDecMul();

        bResult = ed.TestAlgorithm(rijnd);
        bResult = edm.TestAlgorithm(rijnd) && bResult;

        return bResult;
    }
    static Boolean Test()
    {
        Boolean bResult;

        Console.WriteLine("Testing RijndaelManaged encrypt/decrypt...");
        RijndaelManaged rijnd = new RijndaelManaged();
        EncDec          ed    = new EncDec();
        EncDecMul       edm   = new EncDecMul();

        bResult = ed.TestAlgorithm(rijnd);
        bResult = edm.TestAlgorithm(rijnd) && bResult;

        return(bResult);
    }
示例#5
0
    static Boolean Test()
    {
        Boolean bResult;

        Console.WriteLine("Testing AesManaged encrypt/decrypt...");
        AesManaged     aes = new AesManaged();
        EncDec      ed = new EncDec();
        EncDecMul   edm = new EncDecMul();

        bResult = ed.TestAlgorithm(aes);
        bResult = edm.TestAlgorithm(aes) && bResult;

        return bResult;
    }
示例#6
0
    static Boolean Test()
    {
        Boolean bResult;

        Console.WriteLine("Testing AesManaged encrypt/decrypt...");
        AesManaged aes = new AesManaged();
        EncDec     ed  = new EncDec();
        EncDecMul  edm = new EncDecMul();

        bResult = ed.TestAlgorithm(aes);
        bResult = edm.TestAlgorithm(aes) && bResult;

        return(bResult);
    }