What is hashing and its uses ?
Hashing is the process of taking any digital value for example a password and applying some kind of mathematical operation to it which is known as a hashing algorithm or hashing function and obtaining the resulting changed value called a hash or hash value.
Hashing is a function used to map data to a fixed-length value. Businesses use hashing in authentication systems and to also validate different types of data such as files
Hashing can help prevent data breaches and protect stored info.
What are hash tables ?
A hash table which is also known as a hash map is a data structure that maps keys to values. It is one part of a technique which is called hashing, the other of which is called a hash function. A hash function is essentially a algorithm responsible for creating indexes where values can be found or stored and with this data structure it is beneficial because all data has a structure which follows a key value pair system where data can be easily accessible with the corresponding key.
Difference between hashing and encryption
The main difference between hashing and encryption is that hashing is a one way while the process of encryption is two-way.
When you encrypt something, it can be decrypted but hashing confirms if data was not altered along the path from the source to the recipient.
Encryption is used to maintain data confidentiality whilst hashing is used to maintain the data's integrity by ensuring we check if the data was altered or not.
What is a map object ?
A map object is the collection of key-value pairs. A key in the Map may only occur once in the entire object. It is unique in the maps collection. A map object is iterated by key-value pairs.
Looping through a array [ Key , Value ] for each iteration that is successful.
The map object can be used in multiple ways and can complete multiple processes:
- Able to add elements to a map
- Get an element from map by key
- Check the existence of an element by key
- iterate over map values
With all of the functionality that comes with map object you are able to implement the same functions into a hash table reason being that hash tables follow the same structure of that of a key value data structure.
Objects and Maps are similar in that both allow for setting of keys to values , deleting it and retrieving it.
Hashing uses a function or algorithms to map object data to a integer or var that represents the value

Comments
Post a Comment