mirror of
https://github.com/curly60e/pyblock.git
synced 2026-08-15 12:50:38 +02:00
Update sha256.py
This commit is contained in:
parent
96d4c3b8ce
commit
e768ebad2c
1 changed files with 14 additions and 3 deletions
|
|
@ -5,9 +5,17 @@ import time
|
|||
import curses
|
||||
|
||||
def sha256_hash(input_data):
|
||||
sha256 = hashlib.sha256()
|
||||
sha256.update(input_data.encode())
|
||||
return sha256.hexdigest()
|
||||
try:
|
||||
clear()
|
||||
blogo()
|
||||
output = render(
|
||||
"sha256", colors=['yellow'], align='left', font='tiny'
|
||||
)
|
||||
|
||||
print(output)
|
||||
sha256 = hashlib.sha256()
|
||||
sha256.update(input_data.encode())
|
||||
return sha256.hexdigest()
|
||||
|
||||
def binario_de_hexadecimal(hex_string):
|
||||
"""Convierte una cadena hexadecimal en una cadena binaria."""
|
||||
|
|
@ -88,3 +96,6 @@ def mainSHA(stdscr):
|
|||
def ex():
|
||||
# Ejecutar el proceso en un bucle de `curses`
|
||||
curses.wrapper(mainSHA)
|
||||
input("\a\nContinue...")
|
||||
except:
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue