Beispiel #1
0
	def decrypt_with_hash(self, sid, pwdhash):
		"""
		Decrypts the masterkey with the given user's hash and SID.
		Simply computes the corresponding key then calls self.decrypt_with_key()
		"""
		self.decrypt_with_key(crypto.derivePwdHash(pwdhash=pwdhash, sid=sid))
Beispiel #2
0
    def decrypt_with_hash(self, pwdhash):
        """
		Decrypts this credhist entry with the given user's password hash.
		Simply computes the encryption key with the given hash then calls self.decrypt_with_key() to finish the decryption.
		"""
        self.decrypt_with_key(crypto.derivePwdHash(pwdhash, self.credhist.SID))