cancel
Showing results for 
Search instead for 
Did you mean: 

I am struggling to import and assign a secret key required by 'hmacsha1' signature algorithm

Highlighted
New Contributor

I am struggling to import and assign a secret key required by 'hmacsha1' signature algorithm

I am struggling to import and assign a secret key required by http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd#hmac-sha1 algorithm.

 

I am generating a secret key using keytool comment -

 

keytool -genseckey -sigalg hmacsha1 -keysize 56 -alias hmac1 -storetype jceks -keystore H:\keys\clientk.jceks

 

and then import using preferences but I see the following error in log

 

javax.crypto.spec.SecretKeySpec cannot be cast to java.security.PrivateKey

 

Anyone faced this problem below. Any ideas????

 

 

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors