Hashing
Hashing is a fundamental concept in computer science, cryptography, and data structures. It involves converting a large set of data into a smaller, fixed-size value called a hash. This quiz delves into the intricacies of hashing, covering various techniques, applications, and security aspects.
Questions
What is the primary purpose of hashing?
- Compressing data
- Encrypting data
- Generating unique identifiers
- Verifying data integrity
Which hashing algorithm is widely used for password storage?
- MD5
- SHA-1
- SHA-256
- SHA-512
What is a collision in the context of hashing?
- When two different inputs produce the same hash value
- When a hash function is not able to generate a hash value
- When a hash value is too long
- When a hash value is too short
Which hashing algorithm is commonly used in blockchain technology?
- MD5
- SHA-1
- SHA-256
- SHA-512
What is the main advantage of using a hash table data structure?
- Fast searching and retrieval
- Efficient storage utilization
- Reduced memory usage
- Enhanced security
Which hashing technique is commonly used for load balancing in distributed systems?
- Consistent hashing
- Linear hashing
- Quadratic hashing
- Double hashing
What is the purpose of a salt in password hashing?
- To increase the length of the password
- To make the password more complex
- To prevent rainbow table attacks
- To generate a unique hash value
Which hashing algorithm is suitable for generating message digests?
- MD5
- SHA-1
- SHA-256
- SHA-512
What is the main disadvantage of using linear probing in hash tables?
- Increased collision probability
- Reduced search efficiency
- Higher memory usage
- Slower insertion and deletion operations
Which hashing algorithm is suitable for generating cryptographic hashes?
- MD5
- SHA-1
- SHA-256
- SHA-512
What is the purpose of a hash function in a hash table?
- To generate unique keys for data items
- To distribute data evenly across the hash table
- To search for data items efficiently
- To store data items in a compact manner
Which hashing technique is commonly used for resolving collisions in hash tables?
- Chaining
- Linear probing
- Quadratic probing
- Double hashing
What is the main advantage of using double hashing in collision resolution?
- Reduced collision probability
- Improved search efficiency
- Lower memory usage
- Faster insertion and deletion operations
Which hashing algorithm is suitable for generating fingerprints for files?
- MD5
- SHA-1
- SHA-256
- SHA-512