imcrypt app
1.0.0
在這裡,我們有一個無縫的令人驚嘆的Web應用程序,用於使用簡化構建的文本加密和解密。
pip install streamlit
pip install imcrypt
只需克隆這個存儲庫,然後cd到imcrypt-app中並運行以下命令:
streamlit run app . py 
然後轉到此地址http:// localhost:8501在您的瀏覽器中。


代碼本身很短,您可以看到自己。
import streamlit as st
import imcrypt
st . title ( 'Imcrypt' )
st . text ( 'A secure text encryption tool.' )
text = st . text_input ( 'Text:' )
e_type = st . selectbox ( 'Choose One:' , ( 'Encryption' , 'Decryption' ))
password = st . text_input ( 'password:' )
submit = st . button ( 'Submit' )
if submit :
#text or password should not be empty
if not ( password == '' or text == '' ):
#if Encryption is choosen
if e_type == 'Encryption' :
enc_text = imcrypt . encrypt ( text , key = password )
st . text_input ( 'Your Encrypted Text:' , f' { enc_text } ' )
#if Decryption is choosen
elif e_type == 'Decryption' :
try :
enc_text = imcrypt . decrypt ( text , key = password )
st . text_input ( 'Your Decrypted Text:' , f' { enc_text } ' )
except Exception :
pass