Question

Create a textfile called input.txt that contains the string “Hello World!” a. Using openssl, encrypt the...

Create a textfile called input.txt that contains the string “Hello World!”

a. Using openssl, encrypt the input file using CBC, where the DES algorithm is used. Name the output file output.enc

What is the command you used to perform the task above?

b. Now decrypt the output.enc file and name the file decrypted.txt

What is the command you used to perform this task?

c. Use openssl to generate MD5 message digest of input.txt and decrypted.txt

What is the command you used to perform this task?

d. Use openssl to generate SHA1message digest of input.txt and decrypted.txt

What is the command you used to perform this task?

e. Use openssl to generate a pair of public and private key pair with 2048 bits.

What is the command you used to perform this task?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

#include<bits/stdc++.h>
#define MAX 100
using namespace std;

int maze[MAX][MAX];
bool path[MAX][MAX];
vector< pair<int,int> > pathTraverse;
bool findPathUtil(int pos_i,int pos_j,int N,int M)
{
  
   if(pos_i==N-2 && pos_j==M-2)
   {
       cout<<"solution was found at: "<<endl;
       for(int i=0;i<pathTraverse.size();i++)
       {
           cout<<"("<<pathTraverse[i].first<<","<<pathTraverse[i].second<<")";
       }
  
       cout<<endl<<endl;
       return true;
   }
   int next_i,next_j;
   for(int dir=0;dir<4;dir++)
   {
       if(dir==0)       //move farword
       {
           next_i=pos_i;
           next_j=pos_j+1;
           if(next_i>=0 && next_i<N && next_j >=0 && next_j <M)
           {
          
           if(!path[next_i][next_j] && maze[next_i][next_j]==0)
           {
              
               path[next_i][next_j]=true;
               pathTraverse.push_back(make_pair(next_i,next_j));
               findPathUtil(next_i,next_j,N,M);
               path[next_i][next_j]=false;
               pathTraverse.pop_back();
              
           }
           }
       }
       if(dir==1)       //move backword
       {
           next_i=pos_i;
           next_j=pos_j-1;
           if(next_i>=0 && next_i<N && next_j >=0 && next_j <M)
           {
          
           if(!path[next_i][next_j] && maze[next_i][next_j]==0)
           {
                   path[next_i][next_j]=true;
               pathTraverse.push_back(make_pair(next_i,next_j));
               findPathUtil(next_i,next_j,N,M);
               path[next_i][next_j]=false;
               pathTraverse.pop_back();
           }
           }
       }
       if(dir==2)   //move up
       {
           next_i=pos_i-1;
           next_j=pos_j;
           if(next_i>=0 && next_i<N && next_j >=0 && next_j <M)
           {
          
           if(!path[next_i][next_j] && maze[next_i][next_j]==0)
           {
               path[next_i][next_j]=true;
               pathTraverse.push_back(make_pair(next_i,next_j));
               findPathUtil(next_i,next_j,N,M);
               path[next_i][next_j]=false;
               pathTraverse.pop_back();
           }
           }
       }
       if(dir==3)   //move down
       {
           next_i=pos_i+1;
           next_j=pos_j;
           //check if next_i and next_j is within the range
           if(next_i>=0 && next_i<N && next_j >=0 && next_j <M)
           {
          
           if(!path[next_i][next_j] && maze[next_i][next_j]==0)
           {
               path[next_i][next_j]=true;       //make path visited
               pathTraverse.push_back(make_pair(next_i,next_j));
               findPathUtil(next_i,next_j,N,M);
               path[next_i][next_j]=false;       //make path unvisited
               pathTraverse.pop_back();   // remove path
           }
           }
       }
   }
       return true;
}
findAllPath(int N,int M)
{
   for(int i=0;i<N;i++)
   {
       for(int j=0;j<M;j++)
       {
           path[i][j]=false;
       }
   }
   path[1][1]=true;
   pathTraverse.push_back(make_pair(1,1));
   findPathUtil(1,1,N,M);
}
int main()
{
   int N,M;
   fstream f("input.txt");

   f>>N;
   f>>M;
   for(int i=0;i<N;i++)
   {
       for(int j=0;j<M;j++)
       {
           f>>maze[i][j];
       }
   }
   findAllPath(N,M);
  
  
}

Add a comment
Know the answer?
Add Answer to:
Create a textfile called input.txt that contains the string “Hello World!” a. Using openssl, encrypt the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Please help me create this CLI CPU Scheduling Simulator in java: First Come First Serve (FCFS)...

    Please help me create this CLI CPU Scheduling Simulator in java: First Come First Serve (FCFS) Round Robin (RR) Process information The process information will be read from an input file. The format is: pid arrival_time burst_time All of fields are integer type where: pid is a unique numeric process ID arrival_time is the time when the task arrives in the unit of milliseconds burst_time the is the CPU time requested by a task, in the unit of milliseconds The...

  • The Diffie-Hellman public-key encryption algorithm is an alternative key exchange algorithm that is used by protocols...

    The Diffie-Hellman public-key encryption algorithm is an alternative key exchange algorithm that is used by protocols such as IPSec for communicating parties to agree on a shared key. The DH algorithm makes use of a large prime number p and another large number, g that is less than p. Both p and g are made public (so that an attacker would know them). In DH, Alice and Bob each independently choose secret keys, ?? and ??, respectively. Alice then computes...

  • . Huffman Encoding (a.) (6 points) Suppose a certain file contains only the following letters with the corresponding frequencies 1 AİB 73 9 30 44 130 28 16 In a fixed-length encoding scheme, cach...

    . Huffman Encoding (a.) (6 points) Suppose a certain file contains only the following letters with the corresponding frequencies 1 AİB 73 9 30 44 130 28 16 In a fixed-length encoding scheme, cach character is given a binary representation with the same number of bits. What is the minimum number of bits required to represent each letter of this file under fixed-length encoding scheme? Describe how to encode all seven letters in this file using the number of bits...

  • This is my assignment prompt This is an example of the input and output This is...

    This is my assignment prompt This is an example of the input and output This is what I have so far What is the 3rd ToDo in the main.cpp for open the files and read the encrypted message? Does the rest of the code look accurate? Programming Assignment #6 Help Me Find The Secret Message Description: This assignment will require that you read in an encrypted message from a file, decode the message, and then output the message to a...

  • Write code for RSA encryption package rsa; import java.util.ArrayList; import java.util.Random; import java.util.Scanner; public class RSA...

    Write code for RSA encryption package rsa; import java.util.ArrayList; import java.util.Random; import java.util.Scanner; public class RSA {    private BigInteger phi; private BigInteger e; private BigInteger d; private BigInteger num; public static void main(String[] args) {    Scanner keyboard = new Scanner(System.in); System.out.println("Enter the message you would like to encode, using any ASCII characters: "); String input = keyboard.nextLine(); int[] ASCIIvalues = new int[input.length()]; for (int i = 0; i < input.length(); i++) { ASCIIvalues[i] = input.charAt(i); } String ASCIInumbers...

  • JAVA Problem: With the recent news about data breaches and different organizations having their clients’ information...

    JAVA Problem: With the recent news about data breaches and different organizations having their clients’ information being exposed, it is becoming more and more important to find ways to protect our sensitive data. In this program we will develop a simple tool that helps users generate strong passwords, encrypt and decrypt data using some cyphering techniques. You will need to create two classes. The first class is your driver for the application and contains the main method. Name this class...

  • Using python 3.7.3 Challenge: Rock, Paper, Scissors GamePDF Description: Create a menu-driven rock, paper, scissors game...

    Using python 3.7.3 Challenge: Rock, Paper, Scissors GamePDF Description: Create a menu-driven rock, paper, scissors game in Python 3 that a user plays against the computer with the ability to save and load a game and its associated play statistics. Purpose: The purpose of this challenge is to assess the developer’s ability to create an interactive application with data persistence in Python 3. Requirements: Create a Rock, Paper, Scissors game in Python named rps.py according to the requirements specified in...

  • Using Kali Linux, the Windows Linux Sub-System, or another Debian based Linux distribution, perform the following...

    Using Kali Linux, the Windows Linux Sub-System, or another Debian based Linux distribution, perform the following tasks based on the Linux Fundamentals lecture. For this lab, take screenshots for all major steps completed to illustrate that each task was successfully completed the same method as would be used for other labs). Tasks: 1. Create a new user named Billy Bob using the command linter face 2. Add Billy Bob to the sudoers group 3. Update and upgrade your Linux distribution...

  • Question 2 0/1 point (graded) What happens when you remove a directory using the command rm...

    Question 2 0/1 point (graded) What happens when you remove a directory using the command rm -r? You cannot remove a directory using the rm command. You permanently remove the entire directory, including all files and subdirectories. You move the entire directory to a trash folder, but it can be restored later. You get a warning message asking if you want to proceed, then you delete the directory. incorrect Answer Incorrect: Try again. Unix does not warn you before permanently...

  • Develop a Java application that uses a type of encrypted alphabet, called a random monoalphabetic cipher,...

    Develop a Java application that uses a type of encrypted alphabet, called a random monoalphabetic cipher, to encrypt and decrypt a message. Your encryption key and message are to be read in from two different files and then the encrypted message will be output to third file. Then the encrypted message is read in and decrypted to a fourth file. A monoalphabetic cipher starts with an encryption word, removes the redundant letters from the word, and assigns what’s left to...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT