Package org.qubership.atp.crypt
Class KeyPairGenerator
java.lang.Object
org.qubership.atp.crypt.KeyPairGenerator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGeneration of RSA and AES keys.generateKeys(String key) Generation of RSA and encryption the incoming AES key.static voidTo generate pair key from console.Read the base32 form of an AES key.readPrivateKey(String privateKeyString) Read the base32 form of a private key.readPublicKey(String publicKey) Read the base32 form of a public key.
-
Constructor Details
-
KeyPairGenerator
public KeyPairGenerator()
-
-
Method Details
-
generateKeys
Generation of RSA and AES keys.- Returns:
- KeyEntity - key entity generated.
- Throws:
Exception
-
generateKeys
Generation of RSA and encryption the incoming AES key.- Parameters:
key- the key- Returns:
- the key entity
- Throws:
Exception- the exception
-
main
To generate pair key from console.- Parameters:
arg- the input arguments- Throws:
Exception- the exception
-
readPublicKey
Read the base32 form of a public key.- Parameters:
publicKey- - Key String to read from- Returns:
- Object key.
- Throws:
Exception
-
readPrivateKey
Read the base32 form of a private key.- Parameters:
privateKeyString- - Key String to read from- Returns:
- Object key.
- Throws:
Exception
-
readKey
Read the base32 form of an AES key.- Parameters:
keyString- - Key String to read from- Returns:
- Object key.
- Throws:
Exception
-