Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge: Creating Hash Function | Web Cyber Security
Cyber Security Fundamentals

Challenge: Creating Hash FunctionChallenge: Creating Hash Function

Task

Now you will create a simple hash function:

  1. Specify input_string and hash_size as arguments of the simple_mod_hash() function.
  2. Use the modulo (%) operation to create a hash value inside the function.

Note

hash_size argument determines the number of possible hash values the function can generate, which is used to keep the hash value within a specific range.

Everything was clear?

Section 2. Chapter 6
toggle bottom row
course content

Course Content

Cyber Security Fundamentals

Challenge: Creating Hash FunctionChallenge: Creating Hash Function

Task

Now you will create a simple hash function:

  1. Specify input_string and hash_size as arguments of the simple_mod_hash() function.
  2. Use the modulo (%) operation to create a hash value inside the function.

Note

hash_size argument determines the number of possible hash values the function can generate, which is used to keep the hash value within a specific range.

Everything was clear?

Section 2. Chapter 6
toggle bottom row
some-alt