예제 #1
0
class Subtitle(XmlModel):
    def __init__(self, node):
        super(Subtitle, self).__init__(node)
        self._decrypter = SubtitleDecrypter()

    def decrypt(self):
        return StyledSubtitle(self._decrypter.decrypt(
            self._decrypter._build_encryption_key(int(self.id)),
            self['iv'][0].text.decode('base64'),
            self['data'][0].text.decode('base64')))
예제 #2
0
class Subtitle(XmlModel):
    def __init__(self, node):
        super(Subtitle, self).__init__(node)
        self._decrypter = SubtitleDecrypter()

    def decrypt(self):
        return StyledSubtitle(self._decrypter.decrypt(
            self._decrypter._build_encryption_key(int(self.id)),
            base64.b64decode(self['iv'][0].text),
            base64.b64decode(self['data'][0].text)))
예제 #3
0
 def __init__(self, node):
     super(Subtitle, self).__init__(node)
     self._decrypter = SubtitleDecrypter()
예제 #4
0
 def __init__(self, node):
     super(Subtitle, self).__init__(node)
     self._decrypter = SubtitleDecrypter()