Key generation

As seen in the previous section on encryption, Spring Security has a class, namely org.springframework.security.crypto.keygen.KeyGenerators, that has a number of factory methods that can used to construct a number of keys needed for your application.

The following are the two supported types of key generator:

  • BytesKeyGenerator: The generator for generating unique byte array-based keys.
  • StringKeyGenerator: The generator for unique string keys:

Figure 7: The BytesKeyGenerator and StringKeyGenerator factory methods
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.185.155