Interface KeyStoreHelper
- All Known Implementing Classes:
RsaKeyStoreHelper
public interface KeyStoreHelper
The Interface KeyStoreHelper for extracting private/public keys, keystore and generating signer from a file (as an
input stream).
-
Method Summary
Modifier and TypeMethodDescriptiongetKeyStore(InputStream inputStream, String password) Gets the key store.getKeyStore(String instanceType, InputStream inputStream, String password) Gets the key store.getModulusAsBase64String(byte[] modulus) Gets Modulus as a Base64 encoded string.getPrivateKey(KeyStore keyStore, String alias, String password) Gets the private key.getPublicExponentAsBase64String(byte[] publicExponent) Gets Public Exponent as a Base64 encoded string.getPublicKey(KeyStore keyStore, String alias) Gets the public key.org.springframework.security.jwt.crypto.sign.SignergetSigner(String instanceType, InputStream inputStream, String alias, String password) Gets the signer.
-
Method Details
-
getSigner
org.springframework.security.jwt.crypto.sign.Signer getSigner(String instanceType, InputStream inputStream, String alias, String password) throws KeyStoreProcessingException Gets the signer.- Parameters:
instanceType- the instance typeinputStream- the input streamalias- the aliaspassword- the password- Returns:
- the signer
- Throws:
KeyStoreProcessingException- the key store processing exception
-
getKeyStore
Gets the key store.- Parameters:
inputStream- the input streampassword- the password- Returns:
- the key store
- Throws:
KeyStoreProcessingException- the key store processing exception
-
getPrivateKey
PrivateKey getPrivateKey(KeyStore keyStore, String alias, String password) throws KeyStoreProcessingException Gets the private key.- Parameters:
keyStore- the key storealias- the aliaspassword- the password- Returns:
- the private key
- Throws:
KeyStoreProcessingException- the key store processing exception
-
getPublicKey
Gets the public key.- Parameters:
keyStore- the key storealias- the alias- Returns:
- the public key
- Throws:
KeyStoreProcessingException- the key store processing exception
-
getKeyStore
KeyStore getKeyStore(String instanceType, InputStream inputStream, String password) throws KeyStoreProcessingException Gets the key store.- Parameters:
instanceType- the instance typeinputStream- the input streampassword- the password- Returns:
- the key store
- Throws:
KeyStoreProcessingException- the key store processing exception
-
getModulusAsBase64String
Gets Modulus as a Base64 encoded string.- Parameters:
modulus- the modulus- Returns:
- the modulus as Base64 string
-
getPublicExponentAsBase64String
Gets Public Exponent as a Base64 encoded string.- Parameters:
publicExponent- the publicExponent- Returns:
- the publicExponent as Base64 string
-