Class RSA
java.lang.Object
net.ME1312.SubData.Server.Encryption.RSA
- All Implemented Interfaces:
Cipher,CipherFactory
RSA Encryption Handler Class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidvoiddecrypt(DataClient client, InputStream in, OutputStream out) Decrypt Datavoidencrypt(DataClient client, InputStream in, OutputStream out) Encrypt DataGet a cipher by namegetName()Get the name of this CipherGet a cipher by namestatic voidremoveCipher(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:CipherGet the name of this Cipher -
encrypt
Description copied from interface:CipherEncrypt Data -
decrypt
Description copied from interface:CipherDecrypt Data -
newCipher
Description copied from interface:CipherFactoryGet a cipher by name- Specified by:
newCipherin interfaceCipherFactory- Parameters:
handle- Cipher name- Returns:
- Cipher/Token pair
-
getCipher
Description copied from interface:CipherFactoryGet a cipher by name- Specified by:
getCipherin interfaceCipherFactory- Parameters:
handle- Cipher namekey- Token- Returns:
- Cipher
-
addCipher
-
removeCipher
-