You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sebb <se...@gmail.com> on 2016/06/30 17:32:27 UTC

[CRYPTO] is the ConfigurationKeys class needed?

The entries in ConfigurationKeys are only usable with one of the factories.

It might therefore be more sensible to define them in the relevant
factory classes.

This would also allow the names to be shortened.
For example,
ConfigurationKeys.SECURE_RANDOM_CLASSES_KEY
could become
CryptoRandomFactory.CLASSES_KEY

I think this would simplify user code as well as making it easier to
find the keys for a specific implementation.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [CRYPTO] is the ConfigurationKeys class needed?

Posted by sebb <se...@gmail.com>.
On 5 July 2016 at 07:32, Ke, Xianda <xi...@intel.com> wrote:
> +1
> Long long names is burden for user.
>
> What's more, following two constants are just for implementation.
> It does not make sense to mix these with the configuration keys.
> In fact, user can configure a buffer size or algorithm, but he  cannot configure the default value.

Agreed.

> ConfigurationKeys.STREAM_BUFFER_SIZE_DEFAULT
> ConfigurationKeys.SECURE_RANDOM_JAVA_ALGORITHM_DEFAULT
>
> Regards,
> Xianda
>
> -----Original Message-----
> From: sebb [mailto:sebbaz@gmail.com]
> Sent: Friday, July 01, 2016 1:32 AM
> To: CommonsDev
> Subject: [CRYPTO] is the ConfigurationKeys class needed?
>
> The entries in ConfigurationKeys are only usable with one of the factories.
>
> It might therefore be more sensible to define them in the relevant factory classes.
>
> This would also allow the names to be shortened.
> For example,
> ConfigurationKeys.SECURE_RANDOM_CLASSES_KEY
> could become
> CryptoRandomFactory.CLASSES_KEY
>
> I think this would simplify user code as well as making it easier to find the keys for a specific implementation.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


RE: [CRYPTO] is the ConfigurationKeys class needed?

Posted by "Ke, Xianda" <xi...@intel.com>.
+1
Long long names is burden for user.

What's more, following two constants are just for implementation.
It does not make sense to mix these with the configuration keys. 
In fact, user can configure a buffer size or algorithm, but he  cannot configure the default value.

ConfigurationKeys.STREAM_BUFFER_SIZE_DEFAULT
ConfigurationKeys.SECURE_RANDOM_JAVA_ALGORITHM_DEFAULT

Regards,
Xianda

-----Original Message-----
From: sebb [mailto:sebbaz@gmail.com] 
Sent: Friday, July 01, 2016 1:32 AM
To: CommonsDev
Subject: [CRYPTO] is the ConfigurationKeys class needed?

The entries in ConfigurationKeys are only usable with one of the factories.

It might therefore be more sensible to define them in the relevant factory classes.

This would also allow the names to be shortened.
For example,
ConfigurationKeys.SECURE_RANDOM_CLASSES_KEY
could become
CryptoRandomFactory.CLASSES_KEY

I think this would simplify user code as well as making it easier to find the keys for a specific implementation.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org