You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by "Colm O hEigeartaigh (Jira)" <ji...@apache.org> on 2020/04/15 07:49:00 UTC

[jira] [Commented] (SANTUARIO-533) Inconsistent naming of actions SIGNATURE (noun) and ENCRYPT (verb)

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

Colm O hEigeartaigh commented on SANTUARIO-533:
-----------------------------------------------

Looks fine, but from what I can see, the old "ENCRYPT" action is not actually supported any more. I guess some changes are required to check if the action is either ENCRYPTION or ENCRYPT. Could you add a test that verifies this?

> Inconsistent naming of actions SIGNATURE (noun) and ENCRYPT (verb)
> ------------------------------------------------------------------
>
>                 Key: SANTUARIO-533
>                 URL: https://issues.apache.org/jira/browse/SANTUARIO-533
>             Project: Santuario
>          Issue Type: Bug
>          Components: Java
>    Affects Versions: Java 2.1.5
>            Reporter: Peter De Maeyer
>            Assignee: Colm O hEigeartaigh
>            Priority: Trivial
>             Fix For: Java 2.2.0
>
>         Attachments: SANTUARIO-533.patch
>
>
> Inconsistent naming of actions:
> * {{XMLSecurityConstants.SIGNATURE}} is a noun, the _result_ of the action "to sign".
> * {{XMLSecurityConstants.ENCRYPT}} is a verb in the imperative form, the action "to encrypt" itself.
> h3. Solution 1
> Since both are actions, it would make sense to align both to be a verb in the imperative form, which means renaming {{SIGNATURE}} to {{SIGN}}. The drawback of that is that it covers both "sign" (writing output) and "verify" (reading input), so it seems not the most appropriate.
> h3. Solution 2
> An alternative solution is to align both to be a noun. {{SIGNATURE}} covers both "sign" (writing output) and "verify" (reading input). Similarly, {{ENCRYPT}} covers both "encrypt" and "decrypt", which makes it the odd duck. It would be more appropriate to rename {{ENCRYPT}} to {{ENCRYPTION}}. It's also grammatically more correct to say "the encryption action" than "the encrypt action".
> Since it's an essential constant that users are using, it's probably best to keep the old constant deprecated not to break the API.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)