1. 22 Aug, 2019 2 commits
    • Marek Kasik's avatar
      DecryptStream: Use Ref instead of two integers · 8f79db34
      Marek Kasik authored
      Follow the changes introduced before also in this new code.
      8f79db34
    • Marek Kasik's avatar
      Decrypt: Implement crypto functions using NSS · b1502076
      Marek Kasik authored
      This commit moves DecryptStream and EncryptStream
      classes to their own source files so that they can
      have different implementations. Hash functions
      md5(), sha256(), sha384() and sha512() are also placed
      to these source files to allow different implementations.
      There is internal implementation of them
      in DecryptStream.{cc|h} and the NSS one
      in DecryptStreamNSS.{cc|h}.
      
      This commit also adds some new functions for usage
      in functions Decrypt::makeFileKey(), Decrypt::makeFileKey2()
      and revision6Hash().
      These are rc4DecryptArray(), aesDecryptArray() and
      aesEncryptArray().
      
      setNSSDir() function had to be moved to its own source files
      NSS.{cc|h} to have consistent initialization of NSS over
      all functions which needs it.
      b1502076