Fix crypt_load usage in Python binding.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@678 36d66b0a-2a48-0410-832c-cd162a569da5
This commit is contained in:
Milan Broz
2011-11-07 13:05:16 +00:00
parent c1b01c2dc7
commit 6fe40949f9
2 changed files with 39 additions and 5 deletions

View File

@@ -70,4 +70,30 @@ print "deact. :", c.deactivate()
del c
c = pycryptsetup.CryptSetup(
device = IMG,
name = DEVICE,
yesDialog = askyes,
logFunc = log,
passwordDialog = askpassword)
print "activate:", c.activate(name = DEVICE, passphrase = PASSWORD)
c2 = pycryptsetup.CryptSetup(
name = DEVICE,
yesDialog = askyes,
logFunc = log,
passwordDialog = askpassword)
info = c2.info()
print "cipher :", info["cipher"]
print "cmode :", info["cipher_mode"]
print "keysize :", info["keysize"]
print "deact. :", c.deactivate()
r = c2.deactivate()
print "deact. :", r
del c
del c2
os.remove(IMG)