Class KeyFactorySecureRandom
- java.lang.Object
- 
- org.apache.myfaces.application.viewstate.KeyFactorySecureRandom
 
- 
 public class KeyFactorySecureRandom extends Object This factory generate a key composed by a counter and a random number. The counter ensures uniqueness, and the random number prevents guess the next session token.
- 
- 
Constructor SummaryConstructors Constructor Description KeyFactorySecureRandom(FacesContext facesContext)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]decode(String value)Decode a view state session token into a keyStringencode(byte[] key)Encode a Key into a value that will be used as view state session tokenIntegergenerateCounterKey(FacesContext facesContext)byte[]generateKey(FacesContext facesContext)Generates a unique key per session
 
- 
- 
- 
Constructor Detail- 
KeyFactorySecureRandompublic KeyFactorySecureRandom(FacesContext facesContext) 
 
- 
 - 
Method Detail- 
generateCounterKeypublic Integer generateCounterKey(FacesContext facesContext) 
 - 
generateKeypublic byte[] generateKey(FacesContext facesContext) Generates a unique key per session
 - 
encodepublic String encode(byte[] key) Encode a Key into a value that will be used as view state session token
 - 
decodepublic byte[] decode(String value) Decode a view state session token into a key
 
- 
 
-