ERROR - java.security.InvalidKeySpecException - Possible Causes of InvalidKeySpecException

Exception Thrown By:Cause
ClassMethod
SecretKeyFactory public final SecretKey
generateSecret(KeySpec keySpec)
if the given key specification is inappropriate for
this secret key factory to produce a secret key.