0

I'm trying to cipher a parameter using HDIV's cipher tag. I have tried the example from the following page https://github.com/hdiv/hdiv/wiki/05.-HDIV-Tag-Libraries#5113-tag-cipher.

According to the documentation

<input type="hidden" name="p1" value="<hdiv:cipher parameter="p1" value="v1"/>"/>

Should give the result

<input type="hidden" name="p1" value="0"/>

However I am getting

<input type="hidden" name="p1" value="v1"/>

And nothing is ciphered/hidden away.

Is there a piece of configuration that I need?

I am using HDIV 3.2.0

Stefan
  • 1,096
  • 8
  • 10

1 Answers1

1

Are you including the <hdiv:cipher> tag inside a form? For example a <form:form> tag in Spring MVC.

The cipher tag is designed to add new parameters to an existing form, so you have to include it inside a form tag.

Another thing to check is confidentiality configuration option inside Hdiv configuration. If it is disabled, you won't get the confidential value 0 but the real value v1.

gillarramendi
  • 271
  • 1
  • 8
  • Thanks, will have a look. I think my problem was that I was trying to use cipher for something else than what it was built for. – Stefan Jun 06 '16 at 09:31