mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-12 03:10:08 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user