daily pastebin goal
8%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 1
  2. 0
  3. First:Second
  4. Testing string!
  5. ---------------
  6. /**************
  7.  * Author  : karroje
  8.  * Date    : 2011-02-01
  9.  * Purpose : Code provided for student to ensure that their
  10.  *         : Phase 01 code will correctly compile.
  11.  * NOTE    : This file does NOT comprehensivally test your code -- its only
  12.  *         : purpose to ensure that your code *compiles*.  So long as you can
  13.  *         : compile your code with this file as main.cpp, the grader will
  14.  *         : be able to check for correctness.  But it does not mean that your
  15.  *         : code is correct.
  16.  **************/
  17.  
  18. #include "rsa_functions.h"
  19. #include "encrypt.h"
  20.  
  21. #include <iostream>
  22.  
  23. using namespace std;
  24.  
  25. int main() {
  26.   char s1[] = "First";
  27.   char s2[] = "Second";
  28.  
  29.   cout << isLetter('a') << endl;
  30.   cout << isUpper('b') << endl;
  31.   char* d = concatStrings(s1, s2, ':');
  32.   cout << d << endl;
  33.  
  34.  char* t = "Testing string";
  35.  char* s = (char*)malloc( (strlen(t) + 1)*sizeof(char));
  36.  strncpy(s, t + '\0', strlen(t) +1);
  37.  addChar(&s, '!');
  38.  
  39.   cout << s << endl;
  40.   int size;
  41.   char* s3 = readFile("main.cpp", &size);
  42.   cout << "---------------\n" << s3 << "\n---------------\n";
  43.  
  44.   char* e = ceasarCipher(s3, size, 10);
  45.   cout << "---------------\n" << e << "\n---------------\n";
  46.   char* c = ceasarDecipher(e, size, 10);
  47.   cout << "---------------\n" << c << "\n---------------\n";
  48.  
  49.   return 0;
  50. }
  51.  
  52. ---------------
  53. ---------------
  54. /**************
  55.  * Kferyc  : ukccyto
  56.  * Nkeo    : 2011-02-01
  57.  * Zfczydo : Myno zcygsnon pyc defnoxe ey oxdfco erke erosc
  58.  *         : Zrkdo 01 myno hsvv myccomevj mywzsvo.
  59.  * XYEO    : Ersd psvo nyod XYE mywzcoroxdsgkvvj eode jyfc myno -- sed yxvj
  60.  *         : zfczydo ey oxdfco erke jyfc myno *mywzsvod*.  Dy vyxq kd jyf mkx
  61.  *         : mywzsvo jyfc myno hser ersd psvo kd wksx.mzz, ero qcknoc hsvv
  62.  *         : lo klvo ey mromu pyc myccomexodd.  Lfe se nyod xye wokx erke jyfc
  63.  *         : myno sd myccome.
  64.  **************/
  65.  
  66. #sxmvfno "cdk_pfxmesyxd.r"
  67. #sxmvfno "oxmcjze.r"
  68.  
  69. #sxmvfno <sydecokw>
  70.  
  71. fdsxq xkwodzkmo den;
  72.  
  73. sxe wksx() {
  74.   mrkc d1[] = "Pscde";
  75.   mrkc d2[] = "Domyxn";
  76.  
  77.   myfe << sdVoeeoc('k') << oxnv;
  78.   myfe << sdFzzoc('l') << oxnv;
  79.   mrkc* n = myxmkeDecsxqd(d1, d2, ':');
  80.   myfe << n << oxnv;
  81.  
  82.  mrkc* e = "Eodesxq decsxq";
  83.  mrkc* d = (mrkc*)wkvvym( (decvox(e) + 1)*dskoyp(mrkc));
  84.  decxmzj(d, e + '\0', decvox(e) +1);
  85.  knnMrkc(&d, '!');
  86.  
  87.   myfe << d << oxnv;
  88.   sxe dsko;
  89.   mrkc* d3 = coknPsvo("wksx.mzz", &dsko);
  90.   myfe << "---------------\x" << d3 << "\x---------------\x";
  91.  
  92.   mrkc* o = mokdkcMszroc(d3, dsko, 10);
  93.   myfe << "---------------\x" << o << "\x---------------\x";
  94.   mrkc* m = mokdkcNomszroc(o, dsko, 10);
  95.   myfe << "---------------\x" << m << "\x---------------\x";
  96.  
  97.   coefcx 0;
  98. }
  99.  
  100. ---------------
  101. ---------------
  102. /**************
  103.  * AuthoY  : kaYYoje
  104.  * Date    : 2011-02-01
  105.  * PuYpoZe : Code pYovided foY Ztudent to enZuYe that theiY
  106.  *         : PhaZe 01 code will coYYectly compile.
  107.  * NOTE    : ThiZ file doeZ NOT compYehenZivally teZt youY code -- itZ only
  108.  *         : puYpoZe to enZuYe that youY code *compileZ*.  So long aZ you can
  109.  *         : compile youY code with thiZ file aZ main.cpp, the gYadeY will
  110.  *         : be able to check foY coYYectneZZ.  But it doeZ not mean that youY
  111.  *         : code iZ coYYect.
  112.  **************/
  113.  
  114. #include "YZa_functionZ.h"
  115. #include "encYypt.h"
  116.  
  117. #include <ioZtYeam>
  118.  
  119. uZing nameZpace Ztd;
  120.  
  121. int main() {
  122.   chaY Z1[] = "FiYZt";
  123.   chaY Z2[] = "Second";
  124.  
  125.   cout << iZLetteY('a') << endl;
  126.   cout << iZUppeY('b') << endl;
  127.   chaY* d = concatStYingZ(Z1, Z2, ':');
  128.   cout << d << endl;
  129.  
  130.  chaY* t = "TeZting ZtYing";
  131.  chaY* Z = (chaY*)malloc( (ZtYlen(t) + 1)*Ziaeof(chaY));
  132.  ZtYncpy(Z, t + '\0', ZtYlen(t) +1);
  133.  addChaY(&Z, '!');
  134.  
  135.   cout << Z << endl;
  136.   int Ziae;
  137.   chaY* Z3 = YeadFile("main.cpp", &Ziae);
  138.   cout << "---------------\n" << Z3 << "\n---------------\n";
  139.  
  140.   chaY* e = ceaZaYCipheY(Z3, Ziae, 10);
  141.   cout << "---------------\n" << e << "\n---------------\n";
  142.   chaY* c = ceaZaYDecipheY(e, Ziae, 10);
  143.   cout << "---------------\n" << c << "\n---------------\n";
  144.  
  145.   YetuYn 0;
  146. }
  147.  
  148. ---------------
  149. Press any key to continue . . .
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top