Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)

src/r/e/revelation-HEAD/src/bundle/luks.py   revelation(Download)
		# generate the master key digest
		pbkdf = PBKDFv2.PBKDFv2()
		self.mkDigest = pbkdf.makeKey(self.masterKey, self.mkDigestSalt, self.mkDigestIterations, hashlib.new(self.hashSpec).digest_size, self.hashSpec)
 
		# init the key information
		# Hash the key using PBKDFv2
		pbkdf = PBKDFv2.PBKDFv2()
		derived_key = pbkdf.makeKey(password, key.passwordSalt, key.passwordIterations, self.keyBytes, self.hashSpec)
 
		# Split the key into key.stripes
		# Hash the password using PBKDFv2
		pbkdf = PBKDFv2.PBKDFv2()
		derived_key = pbkdf.makeKey(password, key.passwordSalt, key.passwordIterations, self.keyBytes, self.hashSpec)
 
		# Setup the IV generation to use this key
 
		# Check if the password was the correct one, by checking the master key digest
		checkDigest = pbkdf.makeKey(masterKey, self.mkDigestSalt, self.mkDigestIterations, hashlib.new(self.hashSpec).digest_size, self.hashSpec)
 
		# Since the header only stores DIGEST_SIZE (which is smaller than sha256 digest size)