Class RSA
java.lang.Object
net.ME1312.SubData.Client.Encryption.RSA
- All Implemented Interfaces:
Cipher
,CipherFactory
RSA Encryption Handler Class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
void
decrypt
(DataClient client, InputStream in, OutputStream out) Decrypt Datavoid
encrypt
(DataClient client, InputStream in, OutputStream out) Encrypt DataGet a cipher by namegetName()
Get the name of this CipherGet a cipher by namestatic void
removeCipher
(String handle)
-
Constructor Details
-
RSA
Initialize RSA Cipher (Server)- Parameters:
keyLength
- 2048, 3072, 4096 bit modeprivateKey
- Private key location (will generate if unavailable)publicKey
- Public key location (will generate if unavailable)- Throws:
Exception
-
RSA
Initialize RSA Cipher (Client)- Parameters:
publicKey
- Public key location- Throws:
Exception
-
-
Method Details
-
getName
Description copied from interface:Cipher
Get the name of this Cipher -
encrypt
Description copied from interface:Cipher
Encrypt Data -
decrypt
Description copied from interface:Cipher
Decrypt Data -
newCipher
Description copied from interface:CipherFactory
Get a cipher by name- Specified by:
newCipher
in interfaceCipherFactory
- Parameters:
handle
- Cipher name- Returns:
- Cipher/Token pair
-
getCipher
Description copied from interface:CipherFactory
Get a cipher by name- Specified by:
getCipher
in interfaceCipherFactory
- Parameters:
handle
- Cipher namekey
- Token- Returns:
- Cipher
-
addCipher
-
removeCipher
-