蓝鳍鲷
PySimpleAES的Python项目详细描述
#aes
aes密码在python中的安装
1。检查是否安装了python 3+
2。``` pip安装pysimpleaes```
| str:iv,str:salt
散列(password,salt)散列消息str:key
加密(key,iv,msg)加密消息str:encrypted message
解密(key,iv,password)解密消息str:decrypted message
示例代码
您可以在**examples.py**上找到使用示例。但是为了节省时间,让我们看看它是如何工作的:
`` python
类myaes(pysimpleaes):
def\uu init\uu(self):
self.iv,self.salt=self.fortify()
def示例加密(self):
message=input(“message(ascci):”
password=input(“password(ascii):”
enc=self.encrypt(self.hashing(password,self.salt),self.iv,message)
return _enc
def示例加密(self,enc\u data):
password=input(“password(ascii):”
返回self.decrypt(self.hashing(password,self.salt)、self.iv、enc廑data)
sampleaes=myaes()
加密
enc=sampleaes.example廑enc()
如果enc:
打印(“enc:”,< Br/> >< BR> > BR/>< Br/>解密< BR/> DEC=SabPayes。Excel(BE/>):DEC:BR/>打印(Dec.decode(‘ASCII’))
‘BR/> BR/>β检验:BRy/* *在Python上测试3.6位32位BR/> *在Windows 10上测试x64<BR/>< BR/>< BR/>< BR/>< BR/>
aes密码在python中的安装
1。检查是否安装了python 3+
2。``` pip安装pysimpleaes```
| str:iv,str:salt
散列(password,salt)散列消息str:key
加密(key,iv,msg)加密消息str:encrypted message
解密(key,iv,password)解密消息str:decrypted message
示例代码
您可以在**examples.py**上找到使用示例。但是为了节省时间,让我们看看它是如何工作的:
`` python
类myaes(pysimpleaes):
def\uu init\uu(self):
self.iv,self.salt=self.fortify()
def示例加密(self):
message=input(“message(ascci):”
password=input(“password(ascii):”
enc=self.encrypt(self.hashing(password,self.salt),self.iv,message)
return _enc
def示例加密(self,enc\u data):
password=input(“password(ascii):”
返回self.decrypt(self.hashing(password,self.salt)、self.iv、enc廑data)
sampleaes=myaes()
加密
enc=sampleaes.example廑enc()
如果enc:
打印(“enc:”,< Br/> >< BR> > BR/>< Br/>解密< BR/> DEC=SabPayes。Excel(BE/>):DEC:BR/>打印(Dec.decode(‘ASCII’))
‘BR/> BR/>β检验:BRy/* *在Python上测试3.6位32位BR/> *在Windows 10上测试x64<BR/>< BR/>< BR/>< BR/>< BR/>