You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gilles Sadowski (Jira)" <ji...@apache.org> on 2022/05/19 08:53:00 UTC

[jira] [Commented] (CRYPTO-156) Common Class Padding, Transform and AlgorithmMode

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

Gilles Sadowski commented on CRYPTO-156:
----------------------------------------

+1 to reduce/remove duplicate codes.

I only had a very brief look.  Aren't there some fragile uses of the [{{ordinal}}|https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#ordinal--] method?


> Common Class Padding, Transform and AlgorithmMode
> -------------------------------------------------
>
>                 Key: CRYPTO-156
>                 URL: https://issues.apache.org/jira/browse/CRYPTO-156
>             Project: Commons Crypto
>          Issue Type: Improvement
>          Components: Cipher
>    Affects Versions: 1.1.0
>            Reporter: Arturo Bernal
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.1.1
>
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> In order to avoid duplicate code and try to unify the transformation of the token i think it's necessary create the next class/enum:
>  * {{OpenSslTransform}} --> Utility code for dealing with different algorithm types
>  * {{OpenSslPadding}} --> Containg the enumeration of Cipher Algorithm Padding
>  * {{OpenSslAlgorithmMode}} --> Enumeration of Algorithm Mode.
> [https://github.com/apache/commons-crypto/blob/master/src/main/java/org/apache/commons/crypto/cipher/OpenSsl.java#L208]
>  [https://github.com/apache/commons-crypto/blob/master/src/main/java/org/apache/commons/crypto/jna/OpenSslJnaCipher.java#L422]
>  [https://github.com/apache/commons-crypto/blob/master/src/main/java/org/apache/commons/crypto/cipher/OpenSsl.java#L47]
>  [https://github.com/apache/commons-crypto/blob/master/src/main/java/org/apache/commons/crypto/jna/OpenSslJnaCipher.java#L399]



--
This message was sent by Atlassian Jira
(v8.20.7#820007)