Interface KeyStoreHelper
-
- All Known Implementing Classes:
RsaKeyStoreHelper
public interface KeyStoreHelperThe Interface KeyStoreHelper for extracting private/public keys, keystore and generating signer from a file (as an input stream).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.security.KeyStoregetKeyStore(java.io.InputStream inputStream, java.lang.String password)Gets the key store.java.security.KeyStoregetKeyStore(java.lang.String instanceType, java.io.InputStream inputStream, java.lang.String password)Gets the key store.java.lang.StringgetModulusAsBase64String(byte[] modulus)Gets Modulus as a Base64 encoded string.java.security.PrivateKeygetPrivateKey(java.security.KeyStore keyStore, java.lang.String alias, java.lang.String password)Gets the private key.java.lang.StringgetPublicExponentAsBase64String(byte[] publicExponent)Gets Public Exponent as a Base64 encoded string.java.security.PublicKeygetPublicKey(java.security.KeyStore keyStore, java.lang.String alias)Gets the public key.org.springframework.security.jwt.crypto.sign.SignergetSigner(java.lang.String instanceType, java.io.InputStream inputStream, java.lang.String alias, java.lang.String password)Gets the signer.
-
-
-
Method Detail
-
getSigner
org.springframework.security.jwt.crypto.sign.Signer getSigner(java.lang.String instanceType, java.io.InputStream inputStream, java.lang.String alias, java.lang.String password) throws KeyStoreProcessingExceptionGets 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
java.security.KeyStore getKeyStore(java.io.InputStream inputStream, java.lang.String password) throws KeyStoreProcessingExceptionGets the key store.- Parameters:
inputStream- the input streampassword- the password- Returns:
- the key store
- Throws:
KeyStoreProcessingException- the key store processing exception
-
getPrivateKey
java.security.PrivateKey getPrivateKey(java.security.KeyStore keyStore, java.lang.String alias, java.lang.String password) throws KeyStoreProcessingExceptionGets the private key.- Parameters:
keyStore- the key storealias- the aliaspassword- the password- Returns:
- the private key
- Throws:
KeyStoreProcessingException- the key store processing exception
-
getPublicKey
java.security.PublicKey getPublicKey(java.security.KeyStore keyStore, java.lang.String alias) throws KeyStoreProcessingExceptionGets the public key.- Parameters:
keyStore- the key storealias- the alias- Returns:
- the public key
- Throws:
KeyStoreProcessingException- the key store processing exception
-
getKeyStore
java.security.KeyStore getKeyStore(java.lang.String instanceType, java.io.InputStream inputStream, java.lang.String password) throws KeyStoreProcessingExceptionGets 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
java.lang.String getModulusAsBase64String(byte[] modulus)
Gets Modulus as a Base64 encoded string.- Parameters:
modulus- the modulus- Returns:
- the modulus as Base64 string
-
getPublicExponentAsBase64String
java.lang.String getPublicExponentAsBase64String(byte[] publicExponent)
Gets Public Exponent as a Base64 encoded string.- Parameters:
publicExponent- the publicExponent- Returns:
- the publicExponent as Base64 string
-
-