Skip to main content

Featured

Best AI tools for students

Top 3 AI tools for Student  The biggest problem facing students in an information-rich environment is not access, but effective learning. A new generation of Artificial Intelligence (AI) tools is achieving previously unheard-of levels of efficiency, even while tools like interactive simulations and 3D models (like PhET or BioDigital) have made difficult subjects visual. AI is entering the classroom to help with anything from creating personalized study materials to giving prompt, focused feedback on tasks. AI is a co-pilot for the student trip, freeing up cognitive space for more in-depth critical thinking and creative work. We are getting past the basic calculator example. Here are some key AI resources that all students should be aware of and use in order to thrive in the contemporary world. 1. Human Bio Digital Explore the Inner Workings of the Human Body in 3D! Have you ever wished you could peel back the layers and truly see how your body—or a specific medical condition—actual...

Hashing

 Hashing is the process which converts a simple plain text into a text which is not the same text entered. You can think like that after hashing the text is now with mix letters which does not make any sense. Hashing is an algorithm that is used for keeping password database so that if a hacker hacks your database than hacker cannot know the password because it is not password it is hash.

There are many hashing algorithm like md-5, sha256, RSA etc. Hashing algorithm is an encryption algorithm. In different programming language we can convert a word or phrase into hash so that we can keep the word or phrase secret. You know that password is very important because much people sign in in different website. If there password is strong than while converting into simple text it can take lots of time to know. Which means that your password is very secure and strong. 

In different programming the way of writing the program for converting a text into hash may be different but at last we get the output same. For example: 

In python if make a program to convert the phrase 'Hello world' into md5 hash it will give result 3e25960a79dbc69b674cd4ec67a72c62. And If you wish to try in php language it also going to give you same result because word is same 'Hello world'. The syntax comparison is given below:

In Python

import hashlib

result = hashlib.md5(b'Hello world')

print(result.hexdigest())


Output: 3e25960a79dbc69b674cd4ec67a72c62


In Php

<?php

$str = "Hello world";

$a = "3e25960a79dbc69b674cd4ec67a72c62";

echo md5($str);

?>

Output:

3e25960a79dbc69b674cd4ec67a72c62


Here both the result is same. But in case of bcrypt means blowfish algorithm every time you run the program you are going to get new hash for same word or phrase. For example if the run the program that converts "New things to know" into hash and show the hash as output than the first result might show '$2b$12$/LHdmOpjLcK0cOI4KFIJees8YB0K7IJdkTreRQfLlAnSP1VUNgJma', another ''$2b$12$AeUG/6cJL8gepOTphLazBud/Os4tKdZVRrovGscn2qHMqLJhWW.kq".

In python the program is made like this. Code:

import bcrypt

phrase = b"New things to know"

hashed = bcrypt.hashpw(phrase, bcrypt.gensalt())

print(hashed.decode('utf-8'))


Just I want to tell is that it returns different hash for same phrase if it run many times.


Comments

Popular Posts