harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Ellison <t.p.elli...@gmail.com>
Subject Re: [classlib][security]Algorithm comparation should use locale neutral string manipulation.
Date Thu, 11 Oct 2007 07:33:29 GMT
Leo Li wrote:
> On 10/10/07, Tim Ellison <t.p.ellison@gmail.com> wrote:
>> I guess you will have to experiment to figure out if the name is locale
>> specific -- I don't see anything in the spec [1] to say the must be
>> ASCII, but that may be the case.  If it is then you can use the LUNI
>> util [2] to uppercase it.
> 
>     It is really hard to prove the char range of acceptable algorithms.:)
>     But I found that RI will report no such algorithm if the name is
> locale specific:
> 
>     Locale.setDefault(new Locale("tr"));
>     Signature.getInstance("MD5withRSA".toUpperCase());
> 
>    This test to some degree shows that algorithm is acknowledged as
> locale neutral.

Agreed, so just treat it as ascii.

Regards,
Tim

>> [1] http://java.sun.com/j2se/1.5.0/docs/guide/security/CryptoSpec.html#AppA
>> [2] org.apache.harmony.luni.util.Util.toASCIIUpperCase(String)
>>
>> Regards,
>> Tim
>>
> 
> 

Mime
View raw message