commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CRYPTO-85) CryptoCipher ENCRYPT_MODE and DECRYPT_MODE are unnecessary and confusing
Date Tue, 21 Jun 2016 10:14:58 GMT

    [ https://issues.apache.org/jira/browse/CRYPTO-85?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15341502#comment-15341502
] 

Sebb commented on CRYPTO-85:
----------------------------

CRYPTO-85 CryptoCipher ENCRYPT_MODE and DECRYPT_MODE are unnecessary and
confusing

JceCipher uses the javax.crypto.Cipher modes; no need to convert the
input

Project: http://git-wip-us.apache.org/repos/asf/commons-crypto/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-crypto/commit/0acc3423
Tree: http://git-wip-us.apache.org/repos/asf/commons-crypto/tree/0acc3423
Diff: http://git-wip-us.apache.org/repos/asf/commons-crypto/diff/0acc3423



> CryptoCipher ENCRYPT_MODE and DECRYPT_MODE are unnecessary and confusing
> ------------------------------------------------------------------------
>
>                 Key: CRYPTO-85
>                 URL: https://issues.apache.org/jira/browse/CRYPTO-85
>             Project: Commons Crypto
>          Issue Type: Bug
>            Reporter: Sebb
>            Assignee: Dapeng Sun
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message