[Libreoffice-commits] .: src/msocrypto.py
Kohei Yoshida
kohei at kemper.freedesktop.org
Thu Dec 20 13:31:25 PST 2012
src/msocrypto.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit dcb140817bb2fa14640f9427b4b3cc424269b910
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Thu Dec 20 16:32:29 2012 -0500
It makes more sense to parse bytes in read() than in outputAgile().
diff --git a/src/msocrypto.py b/src/msocrypto.py
index 09989c2..541dd75 100644
--- a/src/msocrypto.py
+++ b/src/msocrypto.py
@@ -41,6 +41,8 @@ class EncryptionInfo(object):
if self.type == EncryptionInfo.Type.Standard or self.type == EncryptionInfo.Type.Extensible:
self.size = self.strm.readUnsignedInt(4)
+ elif self.type == EncryptionInfo.Type.Agile:
+ self.bytes = self.strm.readRemainingBytes()
def outputBoolean (self, name, value):
if value:
@@ -72,5 +74,4 @@ class EncryptionInfo(object):
self.outputInt("header stream size", self.size)
def outputAgile (self):
- bytes = self.strm.readRemainingBytes()
- print (bytes)
+ print (self.bytes)
More information about the Libreoffice-commits
mailing list