1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Ronch [10]
3 years ago
6

To create a digital signature, two steps take place that result in the actual signature that is sent with data. In the first ste

p, the message or information to be sent is passed through a hashing algorithm that creates a hash to: ___________________.
Computers and Technology
1 answer:
Ket [755]3 years ago
4 0

Answer: Integrity verification of message.

Explanation:  Digital signature is used for the security purpose of the documents by the encryption technique such as passwords etc.The signature is created electronically for a digital document protection.The document is authenticated if correctly signed by the user/signer .

The collection of algorithms that are encrypted verifies the authenticity while being transferred if document content does not get tampered.This is the verification of integrity of the message sent from the sender to the signer.

You might be interested in
1) Open the file DiceSimulation.java attached below. Create a new project on NetBeans called DiceSimulation. Copy the code from
trapecia [35]

Answer:

As per regulations, I can only answer the code in while loop.

Explanation:

Code in JAVA is given below for while loop

Please read all the comments for better understanding of the code.

Every step is explained well in the code.

Note class name is DiceSimulation.

Code in JAVA (Using while loop)::

import java.util.Random; // Needed for the Random class

/**

This class simulates rolling a pair of dice 10,000 times and counts the number of times doubles of are rolled for each different pair of doubles.

*/

public class DiceSimulation

{

public static void main(String[] args)

{

final int NUMBER = 10000; // Number of dice rolls

// A random number generator used in

// simulating the rolling of dice Random generator = new Random();

int die1Value; // Value of the first die

int die2Value; // Value of the second die

int count = 0; // Total number of dice rolls

int snakeEyes = 0; // Number of snake eyes rolls

int twos = 0; // Number of double two rolls

int threes = 0; // Number of double three rolls

int fours = 0; // Number of double four rolls

int fives = 0; // Number of double five rolls

int sixes = 0; // Number of double six rolls

// TASK #1 Enter your code for the algorithm here

/**

* Following while loop will run until count < Number.

*/

while(count<NUMBER){

/**

* To generate random number in range 1 to 6,

* I have declared two integer variables named min and max

* and initialized to 1 and 6 respectively.

*/

int min=1,max=6;

/**

* An object of Random class named rand is created so that we can generate

* random number.

*/

Random rand=new Random();

 

/**

* Using following formula we get random number in range 1 to 6.

* Both variables i.e die1Value and die2Value are initialized

* with the formula given in each iteration.

*/

die1Value = rand.nextInt((max - min) + 1) + min;

die2Value = rand.nextInt((max - min) + 1) + min;

 

/**

* Now we are interested in cases where there is double i.e

* Both random generated numbers in die1Value and die2Value are same.

*/

if(die1Value==die2Value){

/**

* Now there are 6 possibilities. They are shown in Nested IF-ELSE-IF statements.

* As both values are same, I have taken die1Value to check if it is 1,2,3,4,5 or 6.

*/

if(die1Value==1){

/**

* If die1Value is 1 then we increment snakeEyes by 1.

* Similarly for others too we do the same.

*/

snakeEyes++;

}else if(die1Value==2){

twos++;

}else if(die1Value==3){

threes++;

}else if(die1Value==4){

fours++;

}else if(die1Value==5){

fives++;

}else if(die1Value==6){

sixes++;

}

}

/**

* In each iteration we increment count by 1.

*/

count++;

}//While loop ends here.

// Display the results

System.out.println ("You rolled snake eyes " + snakeEyes + " out of " + count + " rolls.");

System.out.println ("You rolled double twos " + twos + " out of " + count + " rolls.");

System.out.println ("You rolled double threes " + threes + " out of " + count + " rolls.");

System.out.println ("You rolled double fours " + fours + " out of " + count + " rolls.");

System.out.println ("You rolled double fives " + fives + " out of " + count + " rolls.");

System.out.println ("You rolled double sixes " + sixes + " out of " + count + " rolls.");

 

}//main ends

}//class ends

4 0
3 years ago
2- (8 point) Write a program using the instructions below. Assume that integers are stored in 4 bytes. a) Define an array of typ
lakkis [162]

Answer:

a)  

int apples [5] = {2, 4, 6, 8, 10};

b)

int *aPtr   //this is the pointer to int

Another way to attach a pointer to a an int variable that already exists:

int * aPtr;

int var;

aPtr = &var;

c)

for (int i = 0; i < size; i++){

       cout << values[i] << endl;    }

d)  

   aPtr = values;

   aPtr = &values[0];    

both  the statements are equivalent

e)

If its referring to the part d) then the address is:

cout<<aPtr;

f)

     for (int i = 0; i < size; ++i) {

            cout<<*(vPtr + i)<<endl;    }

g)

   cout << (aPtr + 3) << endl;  // address referenced by aPtr + 3

   cout << *(aPtr + 3) << endl; // value stored at that location

This value stored at location is 8

h)

    aPtr = &apples[4];

    aPtr -= 4;

    cout<<aPtr<<endl;

    cout<<*aPtr<<endl;  

Explanation:        

a)

int apples [5] = {2, 4, 6, 8, 10};

In this statement the array names is apples, the size of the array is specified in square brackets. so the size is 5. The type of array apples is int this means it can store integer elements. The values or elements of the array apples are even integers from 2 to 10. So the elements of array are:

apples[0] = 2

apples[1] = 4

apples[2] = 6

apples[3] = 8

apples[4] = 10

b)

In this statement int *aPtr  

The int* here is used to make the pointer aPtr points to integer object. Data type the pointer is pointing to is int. The asterisk symbol used with in makes this variable aPtr a pointer.

If there already exists an int type variable i.e. var and we want the pointer to point to that variable then declare an int type pointer aPtr and aPtr = &var; assigns the address of variable var to aPtr.

int * aPtr;

int var;

aPtr = &var;

c)

The complete program is:

int size= 5;

int values[size] = {2,4,6,8,10};

for (int i = 0; i < size; i++){

       cout << values[i] << endl; }

The size of array is 5. The name of array is values. The elements of array are 2,4,6,8,10.

To print each element of the values array using array subscript notation, the variable i is initialized to 0, because array index starts at 0. The cout statement inside body of loop prints the element at 0-th index i.e. the first element of values array at first iteration. Then i is incremented by 1 each time the loop iterates, and this loop continues to execute until the value of i get greater of equal to the size i.e. 5 of values array.

The output is:

2

4

6

8

10

d)

aPtr = values;

This statement assigns the first element in values array to pointer aPtr. Here values is the address of the first element of the array.

aPtr = &values[0];    

In this statement &values[0] is the starting address of the array values to which is assigned to aPtr. Note that the values[0] is the first element of the array values.

e)

Since &values[0] is the starting address of the array values to which is assigned to aPtr. So this address is the physical address of the starting of the array. If referring to the part d) then use this statement to print physical address is aPtr pointing to

cout<<aPtr;

This is basically the starting address of the array values to which is assigned to aPtr.

The output:

0x7fff697e1810                

f)

i variable represents offset and corresponds directly to the array index.

name of the pointer i.e. vPtr references the array

So the statement (vPtr + i) means pointer vPtr that references to array values plus the offset i array index that is to be referenced. This statement gives the address of i-th element of values array. In order to get the value of the i-th element of values array, dereference operator * is used.  It returns an ith value equivalent to the address the vPtr + i is pointing to. So the output is:

2

3

6

8

10

g)

values[0] is stored at 1002500

aPtr + 3 refers to values[3],

An integer is 4 bytes long,

So the address that is referenced by aPtr + 3 is

1002500 + 3 * 4 = 1002512

values[3] is basically the element of values array at 3rd index which is the 4th element of the array so the value stored at that referred location  is 8.

h)

Given that aPtr points to apples[4], so the address stored in aPtr is

1002500 + 4 * 4 = 1002516

aPtr -= 4  is equivalent to aPtr = aPtr - 4

The above statement decrements aPtr by 4 elements of apples array, so the new value is:

1002516 - 4 * 4 = 1002500

This is the address of first element of apples array i.e 2.

Now

cout<<aPtr<<endl; statement prints the address  referenced by aPtr -= 4 which is 1002500  

cout<<*aPtr<<endl;  statement prints the value is stored at that location which is 2.

6 0
4 years ago
What is the full form of ICT?​
dalvyx [7]
Information and communications technology
3 0
3 years ago
Read 2 more answers
_____ is a scam in which access to one's own computer is locked or restricted in some way.
gtnhenbr [62]
Ransomware is the answer to this.
5 0
3 years ago
Concept of national sovereignty was established by the
Eduardwww [97]

Answer:

Explanation:

Thomas Hobbes. He was the one who provided the term with its modern meaning.

7 0
4 years ago
Other questions:
  • Pls go to my account and answer my question
    11·2 answers
  • You notice that somehow you have duplicate records for some of your clients in your database. What should you do?
    13·2 answers
  • Select the correct answer.
    9·2 answers
  • Does anyone have game design in connections
    13·1 answer
  • Write an algorithm that receives a number from the user (you can store the number in a variable called N). Then the algorithm sh
    8·1 answer
  • If the old and new systems are operated side by side until the new system has proven itself, this type of system conversion plan
    11·1 answer
  • This is a type race kindly join.
    11·1 answer
  • Which is the correct code to declare a catch-all handler?
    13·1 answer
  • How to make a computer
    14·2 answers
  • A _____ is a grid that displays fields as columns and records as rows.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!