# Re: International version

Jan Luehe (luehe@laguna.eng.sun.com)
Mon, 30 Nov 1998 19:26:26 -0800 (PST)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Anthony Masciulli: "Fighting Microsoft's dominance and business practices."
- Previous message: He Xiaoping: "How are you"
- Maybe in reply to: Xiaohua Hua: "International version"

Xiaohua:

> I have read some of the documents about JCE. I found out that in the Mac
> class if you want to use HmacSHA1 as the algorithm, you will have to
> provide a secret key. According to RFC2104, the secret key can be of any
> length. But from the existing key generating class in JCE1.2 Beta, you can
> only generate certain length of key associated with an encrypting
> algorithm. Could you explain me how it works if one wants to generate any
> length of secret key which is not associated with any algorithm which still
> can be used in the HMAC class?

I am not sure I understand your question.
The javax.crypto.KeyGenerator class has an "init" method that
takes a "int keysize" parameter.

This allows you to specify the size of the key to be generated.

Jan

- Next message: Anthony Masciulli: "Fighting Microsoft's dominance and business practices."
- Previous message: He Xiaoping: "How are you"
- Maybe in reply to: Xiaohua Hua: "International version"