Puneetmeena / posist_task

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

First of all execute the pos.cpp file and create the superuser by entering user and password. Enter your password again to start the operations then then the options are on your screen with its own id (example: 1.Add user in this 1 is id and operation is add user), then you enter the id of operations and then perform your operations. Execute the time.cpp file to see the time and date. execute hash.cpp for hashing.

Algorithm used

  1. Root node is the genisis node

  2. list of nodes under vector is the child nodes.

  3. given node id traverse to a given node and iterate the children

  4. to encrypt the data we can use any ciper technique like and change the value of string data suisng 2 functions encrypt and decrypt.when data is entered by the user it is stored in encrypted format.if the user id == node owner id the user the encrypt function automatically passes the key. else the key is is asked by application from user.

  5. as explained in 4.

  6. normal edit function of nary tree.

  7. to do this ask for key from orignal owner. on entering the key the user decrypts the data from owner and the owner is chnaged to current user.

  8. to find the longest chain calcualte the diameter.

  9. calculate length of chain and change the ownership to one with longer chain .use utility function

About


Languages

Language:C++ 100.0%