class Class1:
def __init__(self, main):
self.m = main
self.x = 5
class Class2:
def __init__(self, main):
self.m = main
self.n = 4
self.xn = self.m.cl1.x * self.n # this is the actual interlink between classes via MainClass
return self.xn
class MainClass:
def __init__(self):
self.cl1 = Class1(self)
self.cl2 = Class2(self)
if __name__ == '__main__':
m = MainClass()
m.cl1()
print(m.cl2())
方法给出了哈希的十六进制表示形式,但是有没有办法以与存储Linux哈希相同的格式来打印它?
在linux中,密码哈希存储如下:
.digest('hex')