docs: def decrypt(self,ciphertext,n=''):
          """Decrypt some ciphertext
  
              ciphertext  = a string of binary data
              n           = the 'tweak' value when the chaining mode is XTS
  
          The decrypt function will decrypt the supplied ciphertext.
          The behavior varies slightly depending on the chaining mode.
  
          ECB, CBC:
          ---------
          When the supplied ciphertext is not a multiple of the blocksize
            of the cipher, then the remaining ciphertext will be cached.
          The next time the decrypt function is called with some ciphertext,
            the new ciphertext will be concatenated to the cache and then
            cache+ciphertext will be decrypted.
  
          CFB, OFB, CTR:
          --------------
          When the chaining mode allows the cipher to act as a stream cipher,
            the decrypt function will always decrypt all of the supplied
            ciphertext immediately. No cache will be kept.
  
          XTS:
          ----
          Because the handling of the last two blocks is linked,
            it needs the whole block of ciphertext to be supplied at once.
          Every decrypt function called on a XTS cipher will output
            a decrypted block based on the current supplied ciphertext block.
  
          CMAC:
          -----
          Mode not supported for decryption as this does not make sense.
          """
          #self.ed = 'e' if chain is encrypting, 'd' if decrypting,
          # None if nothing happened with the chain yet
          #assert self.ed in ('d',None)
          # makes sure you don't decrypt with a cipher that has started encrypting
          self.ed = 'd'
          if self.mode == MODE_XTS:
              # data sequence number (or 'tweak') has to be provided when in XTS mode
              return self.chain.update(ciphertext,'d',n)
          else:
              return self.chain.update(ciphertext,'d')