Once you have setup a keystore, it's time to use those keys.
To get a reference to a java.security.PrivateKey
, use the
<crypt:privateKey>
element.
<crypt:privateKey id="privateKey" keystore-ref="keystore" alias="test" password="password"/> <crypt:keystore id="keystore" location="classpath:keystore.jks" password="password"/>
To get a reference to a java.security.PublicKey
, use the
<crypt:publicKey>
element.
<crypt:publicKey id="publicKey" keystore-ref="keystore" alias="test"/> <crypt:keystore id="keystore" location="classpath:keystore.jks" password="password"/>
To get a reference to a java.security.Key
, use the
<crypt:secretKey>
element.
<crypt:secretKey id="secretKey" keystore-ref="keystore" alias="hmac" password="changeit"/> <crypt:keystore id="keystore" location="classpath:keystore.jceks" password="changeit" type="JCEKS"/>