[CRYPTO] is the ConfigurationKeys class needed?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[CRYPTO] is the ConfigurationKeys class needed?

sebb-2-2
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: [CRYPTO] is the ConfigurationKeys class needed?

Ke, Xianda
+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:[hidden email]]
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: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [CRYPTO] is the ConfigurationKeys class needed?

sebb-2-2
On 5 July 2016 at 07:32, Ke, Xianda <[hidden email]> 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:[hidden email]]
> 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]