Klasse LtpaKeyUtils
java.lang.Object
de.sephirothj.spring.security.ltpa2.LtpaKeyUtils
Utility class for working with encoded and/or encrpyted keys exported from IBM WebSphere Application Server and Liberty Profile
- Autor:
- Sephiroth
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungdecodePublicKey(String encryptedPublicKey) decodes an base64-encoded public keycom.ibm.websphere.ltpa.PublicKeydecryptPrivateKey(String encryptedKey, String password) decrypt the private key (com.ibm.websphere.ltpa.PrivateKey) that is used to sign an LTPA2 tokendecryptSharedKey(String encryptedKey, String password) decrypts the shared secret key (com.ibm.websphere.ltpa.3DESKey) that is used to encrypt a serialized LTPA2 token
-
Konstruktordetails
-
LtpaKeyUtils
public LtpaKeyUtils()
-
-
Methodendetails
-
decodePublicKey
@NonNull public PublicKey decodePublicKey(@NonNull String encryptedPublicKey) throws GeneralSecurityException decodes an base64-encoded public keycom.ibm.websphere.ltpa.PublicKey- Parameter:
encryptedPublicKey- the base64-encoded public key which corresponds to the private key that is used to sign an LTPA2 token- Gibt zurück:
- the decoded public key
- Löst aus:
GeneralSecurityException- if anything went wrong
-
decryptPrivateKey
@NonNull public PrivateKey decryptPrivateKey(@NonNull String encryptedKey, @NonNull String password) throws GeneralSecurityException decrypt the private key (com.ibm.websphere.ltpa.PrivateKey) that is used to sign an LTPA2 token- Parameter:
encryptedKey- the base64-encoded and with 3DES encrypted keypassword- the password for decryption- Gibt zurück:
- the decrypted key
- Löst aus:
GeneralSecurityException- if anything went wrong