Skip to content

perxpective/sha256

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

sha256

A very, very simple program to encrypt a message using hash sha256, commonly used in network security.

I import the hashlib library so that I am able to perform sha256 functions.

import hashlib

I prompt the user for a string input. After which, the string input gets encoded using functions below, storing the encoded values into a new variable encode.

text = input('enter string to encrpyt: ')
encode = hashlib.sha256(text.encode())

Output the result.

print(encode.hexdigest()) 

Dry Run

enter string to encrpyt: hello world
>>> b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9
DROPDOWN!
  • hello1
  • hello2
  • hello3

About

Encrypt a message using hash sha256.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages