Package es.kukenan.smartfi.parser
Class KukenParser
java.lang.Object
es.kukenan.smartfi.parser.KukenParser
Bean uses to generate correct RSA encrypt and decrypt according to rules of CORE system.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate CipherBean user to Cypher into several algorithms.private KeyFactoryBean user to KeyFactory.private X509EncodedKeySpecBean user to X509EncodedKeySpec.private PKCS8EncodedKeySpecBean user to PKCS8EncodedKeySpec.private PrivateKeyBean user to PrivateKey.private PublicKeyBean user to PublicKey. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDecrypt to RSA.Encrypt in RSA.getPrivateKey(String base64PrivateKey) Method to get private key.getPublicKey(String base64PublicKey) Method to get public key.
-
Field Details
-
cf
Bean user to Cypher into several algorithms. -
publicKey
Bean user to PublicKey. -
privateKey
Bean user to PrivateKey. -
keySpec
Bean user to X509EncodedKeySpec. -
keySpecPcks8
Bean user to PKCS8EncodedKeySpec. -
keyFactory
Bean user to KeyFactory.
-
-
Constructor Details
-
KukenParser
public KukenParser()Constructor for AuthBean.
-
-
Method Details
-
getPublicKey
Method to get public key.- Parameters:
base64PublicKey- String in base64 for Public key.- Returns:
- Get public key from string.
-
getPrivateKey
Method to get private key.- Parameters:
base64PrivateKey- String in base64 for Private key.- Returns:
- Get private key from string.
-
decrypt
Decrypt to RSA.- Parameters:
data- Data in bytes format.privateKey- Input in base64.- Returns:
- String decrypted for KUKEN.
-
encrypt
Encrypt in RSA.- Parameters:
data- Data in bytes format.publicKey- Input in base64.- Returns:
- String encrypted for KUKEN.
-