• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/amule/libcryptoxx-5.6.0/

Lines Matching refs:fail

423 	bool pass=true, fail;
433 fail = memcmp(out, cipher, cg.BlockSize()) != 0;
437 fail=fail || memcmp(outplain, plain, cg.BlockSize());
439 pass = pass && !fail;
441 cout << (fail ? "FAILED " : "passed ");
456 : validOutput(validOutput), outputLen(outputLen), counter(0), fail(false) {}
462 fail = true;
475 fail = true;
483 return !fail;
488 bool fail;
562 bool pass=true, fail;
572 fail = !TestFilter(StreamTransformationFilter(modeE, NULL, StreamTransformationFilter::NO_PADDING).Ref(),
574 pass = pass && !fail;
575 cout << (fail ? "FAILED " : "passed ") << "ECB encryption" << endl;
578 fail = !TestFilter(StreamTransformationFilter(modeD, NULL, StreamTransformationFilter::NO_PADDING).Ref(),
580 pass = pass && !fail;
581 cout << (fail ? "FAILED " : "passed ") << "ECB decryption" << endl;
591 fail = !TestFilter(StreamTransformationFilter(modeE, NULL, StreamTransformationFilter::NO_PADDING).Ref(),
593 pass = pass && !fail;
594 cout << (fail ? "FAILED " : "passed ") << "CBC encryption with no padding" << endl;
597 fail = !TestFilter(StreamTransformationFilter(modeD, NULL, StreamTransformationFilter::NO_PADDING).Ref(),
599 pass = pass && !fail;
600 cout << (fail ? "FAILED " : "passed ") << "CBC decryption with no padding" << endl;
602 fail = !TestModeIV(modeE, modeD);
603 pass = pass && !fail;
604 cout << (fail ? "FAILED " : "passed ") << "CBC mode IV generation" << endl;
616 fail = !TestFilter(StreamTransformationFilter(modeE).Ref(),
618 pass = pass && !fail;
619 cout << (fail ? "FAILED " : "passed ") << "CBC encryption with PKCS #7 padding" << endl;
622 fail = !TestFilter(StreamTransformationFilter(modeD).Ref(),
624 pass = pass && !fail;
625 cout << (fail ? "FAILED " : "passed ") << "CBC decryption with PKCS #7 padding" << endl;
637 fail = !TestFilter(StreamTransformationFilter(modeE, NULL, StreamTransformationFilter::ONE_AND_ZEROS_PADDING).Ref(),
639 pass = pass && !fail;
640 cout << (fail ? "FAILED " : "passed ") << "CBC encryption with one-and-zeros padding" << endl;
643 fail = !TestFilter(StreamTransformationFilter(modeD, NULL, StreamTransformationFilter::ONE_AND_ZEROS_PADDING).Ref(),
645 pass = pass && !fail;
646 cout << (fail ? "FAILED " : "passed ") << "CBC decryption with one-and-zeros padding" << endl;
655 fail = !TestFilter(StreamTransformationFilter(modeE, NULL, StreamTransformationFilter::ZEROS_PADDING).Ref(),
657 pass = pass && !fail;
658 cout << (fail ? "FAILED " : "passed ") << "CBC encryption with zeros padding" << endl;
661 fail = !TestFilter(StreamTransformationFilter(modeD, NULL, StreamTransformationFilter::ZEROS_PADDING).Ref(),
663 pass = pass && !fail;
664 cout << (fail ? "FAILED " : "passed ") << "CBC decryption with zeros padding" << endl;
675 fail = !TestFilter(StreamTransformationFilter(modeE).Ref(),
677 pass = pass && !fail;
678 cout << (fail ? "FAILED " : "passed ") << "CBC encryption with ciphertext stealing (CTS)" << endl;
681 fail = !TestFilter(StreamTransformationFilter(modeD).Ref(),
683 pass = pass && !fail;
684 cout << (fail ? "FAILED " : "passed ") << "CBC decryption with ciphertext stealing (CTS)" << endl;
686 fail = !TestModeIV(modeE, modeD);
687 pass = pass && !fail;
688 cout << (fail ? "FAILED " : "passed ") << "CBC CTS IV generation" << endl;
699 fail = !TestFilter(StreamTransformationFilter(modeE).Ref(),
701 fail = memcmp(stolenIV, decryptionIV, 8) != 0 || fail;
702 pass = pass && !fail;
703 cout << (fail ? "FAILED " : "passed ") << "CBC encryption with ciphertext and IV stealing" << endl;
706 fail = !TestFilter(StreamTransformationFilter(modeD).Ref(),
708 pass = pass && !fail;
709 cout << (fail ? "FAILED " : "passed ") << "CBC decryption with ciphertext and IV stealing" << endl;
718 fail = !TestFilter(StreamTransformationFilter(modeE).Ref(),
720 pass = pass && !fail;
721 cout << (fail ? "FAILED " : "passed ") << "CFB encryption" << endl;
724 fail = !TestFilter(StreamTransformationFilter(modeD).Ref(),
726 pass = pass && !fail;
727 cout << (fail ? "FAILED " : "passed ") << "CFB decryption" << endl;
729 fail = !TestModeIV(modeE, modeD);
730 pass = pass && !fail;
731 cout << (fail ? "FAILED " : "passed ") << "CFB mode IV generation" << endl;
740 fail = !TestFilter(StreamTransformationFilter(modeE).Ref(),
742 pass = pass && !fail;
743 cout << (fail ? "FAILED " : "passed ") << "CFB (8-bit feedback) encryption" << endl;
746 fail = !TestFilter(StreamTransformationFilter(modeD).Ref(),
748 pass = pass && !fail;
749 cout << (fail ? "FAILED " : "passed ") << "CFB (8-bit feedback) decryption" << endl;
751 fail = !TestModeIV(modeE, modeD);
752 pass = pass && !fail;
753 cout << (fail ? "FAILED " : "passed ") << "CFB (8-bit feedback) IV generation" << endl;
762 fail = !TestFilter(StreamTransformationFilter(modeE).Ref(),
764 pass = pass && !fail;
765 cout << (fail ? "FAILED " : "passed ") << "OFB encryption" << endl;
768 fail = !TestFilter(StreamTransformationFilter(modeD).Ref(),
770 pass = pass && !fail;
771 cout << (fail ? "FAILED " : "passed ") << "OFB decryption" << endl;
773 fail = !TestModeIV(modeE, modeD);
774 pass = pass && !fail;
775 cout << (fail ? "FAILED " : "passed ") << "OFB IV generation" << endl;
784 fail = !TestFilter(StreamTransformationFilter(modeE).Ref(),
786 pass = pass && !fail;
787 cout << (fail ? "FAILED " : "passed ") << "Counter Mode encryption" << endl;
790 fail = !TestFilter(StreamTransformationFilter(modeD).Ref(),
792 pass = pass && !fail;
793 cout << (fail ? "FAILED " : "passed ") << "Counter Mode decryption" << endl;
795 fail = !TestModeIV(modeE, modeD);
796 pass = pass && !fail;
797 cout << (fail ? "FAILED " : "passed ") << "Counter Mode IV generation" << endl;
812 fail = !TestFilter(cbcmacFilter, plain, sizeof(plain), mac1, sizeof(mac1));
813 pass = pass && !fail;
814 cout << (fail ? "FAILED " : "passed ") << "CBC MAC" << endl;
818 fail = !TestFilter(dmacFilter, plain, sizeof(plain), mac2, sizeof(mac2));
819 pass = pass && !fail;
820 cout << (fail ? "FAILED " : "passed ") << "DMAC" << endl;
825 fail = !TestModeIV(modeE, modeD);
826 pass = pass && !fail;
827 cout << (fail ? "FAILED " : "passed ") << "AES CTR Mode" << endl;
832 fail = !TestModeIV(modeE, modeD);
833 pass = pass && !fail;
834 cout << (fail ? "FAILED " : "passed ") << "AES OFB Mode" << endl;
839 fail = !TestModeIV(modeE, modeD);
840 pass = pass && !fail;
841 cout << (fail ? "FAILED " : "passed ") << "AES CFB Mode" << endl;
846 fail = !TestModeIV(modeE, modeD);
847 pass = pass && !fail;
848 cout << (fail ? "FAILED " : "passed ") << "AES CBC Mode" << endl;
883 bool pass=true, fail;
897 fail = memcmp(out, cipher, RC2Encryption::BLOCKSIZE) != 0;
901 fail=fail || memcmp(outplain, plain, RC2Encryption::BLOCKSIZE);
903 pass = pass && !fail;
905 cout << (fail ? "FAILED " : "passed ");
1044 bool pass=true, fail;
1051 fail = memcmp(Input0, Output0, sizeof(Input0)) != 0;
1052 cout << (fail ? "FAILED" : "passed") << " Test 0" << endl;
1053 pass = pass && !fail;
1057 fail = memcmp(Output1, Key1, sizeof(Key1)) != 0;
1058 cout << (fail ? "FAILED" : "passed") << " Test 1" << endl;
1059 pass = pass && !fail;
1062 for (i=0, fail=false; i<sizeof(Input2); i++)
1064 fail = true;
1065 cout << (fail ? "FAILED" : "passed") << " Test 2" << endl;
1066 pass = pass && !fail;
1069 for (i=0, fail=false; i<sizeof(Input3); i++)
1071 fail = true;
1072 cout << (fail ? "FAILED" : "passed") << " Test 3" << endl;
1073 pass = pass && !fail;
1076 for (i=0, fail=false; i<sizeof(Input4); i++)
1078 fail = true;
1079 cout << (fail ? "FAILED" : "passed") << " Test 4" << endl;
1080 pass = pass && !fail;
1163 bool pass=true, fail;
1169 fail = memcmp(out, cipher[i], 8) != 0;
1173 fail = fail || memcmp(outplain, plain[i], 8);
1174 pass = pass && !fail;
1176 cout << (fail ? "FAILED " : "passed ");
1279 bool pass = true, fail;
1311 fail = !TestFilter(HexEncoder().Ref(), data, 255, (const byte *)hexEncoded, strlen(hexEncoded));
1312 cout << (fail ? "FAILED " : "passed ");
1314 pass = pass && !fail;
1316 fail = !TestFilter(HexDecoder().Ref(), (const byte *)hexEncoded, strlen(hexEncoded), data, 255);
1317 cout << (fail ? "FAILED " : "passed ");
1319 pass = pass && !fail;
1321 fail = !TestFilter(Base32Encoder().Ref(), data, 255, (const byte *)base32Encoded, strlen(base32Encoded));
1322 cout << (fail ? "FAILED " : "passed ");
1324 pass = pass && !fail;
1326 fail = !TestFilter(Base32Decoder().Ref(), (const byte *)base32Encoded, strlen(base32Encoded), data, 255);
1327 cout << (fail ? "FAILED " : "passed ");
1329 pass = pass && !fail;
1331 fail = !TestFilter(Base64Encoder(new HexEncoder).Ref(), data, 255, (const byte *)base64AndHexEncoded, strlen(base64AndHexEncoded));
1332 cout << (fail ? "FAILED " : "passed ");
1334 pass = pass && !fail;
1336 fail = !TestFilter(HexDecoder(new Base64Decoder).Ref(), (const byte *)base64AndHexEncoded, strlen(base64AndHexEncoded), data, 255);
1337 cout << (fail ? "FAILED " : "passed ");
1339 pass = pass && !fail;