Uploaded image for project: 'Commons Crypto'
  1. Commons Crypto
  2. CRYPTO-85

CryptoCipher ENCRYPT_MODE and DECRYPT_MODE are unnecessary and confusing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      The CryptoCipher.ENCRYPT_MODE and DECRYPT_MODE constants don't seem to serve any purpose.

      They should be dropped and the javax.crypto.Cipher constants used instead.

      Alternatively, replace them with an enum, which would allow the compiler to check the values.

      Note: the values currently have to be checked by both JceCipher and OpensslCipher. Since JceCipher uses the Cipher constant that check would disappear if the CryptoCipher constant were dropped.

      Attachments

        Activity

          People

            dapengsun Dapeng Sun
            sebb Sebb
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: