nivith
10 years agoNew 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 'hmacsha1' signature algorithm
2 hours ago
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????