Package org.freedesktop.secret
Class TransportEncryption
- java.lang.Object
-
- org.freedesktop.secret.TransportEncryption
-
- All Implemented Interfaces:
AutoCloseable
public class TransportEncryption extends Object implements AutoCloseable
-
-
Field Summary
Fields Modifier and Type Field Description static intAES_BITSstatic intPRIVATE_VALUE_BITS
-
Constructor Summary
Constructors Constructor Description TransportEncryption()TransportEncryption(Service service)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()voidclose()char[]decrypt(Secret secret)Secretencrypt(byte[] plain, Charset charset)Secretencrypt(CharSequence plain)voidgenerateSessionKey()ServicegetService()voidinitialize()voidopenSession()
-
-
-
Field Detail
-
PRIVATE_VALUE_BITS
public static final int PRIVATE_VALUE_BITS
- See Also:
- Constant Field Values
-
AES_BITS
public static final int AES_BITS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TransportEncryption
public TransportEncryption() throws org.freedesktop.dbus.exceptions.DBusException- Throws:
org.freedesktop.dbus.exceptions.DBusException
-
TransportEncryption
public TransportEncryption(Service service)
-
-
Method Detail
-
initialize
public void initialize() throws NoSuchAlgorithmException, InvalidAlgorithmParameterException
-
openSession
public void openSession()
-
generateSessionKey
public void generateSessionKey() throws NoSuchAlgorithmException, InvalidKeySpecException, InvalidKeyException
-
encrypt
public Secret encrypt(CharSequence plain) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidAlgorithmParameterException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException
-
encrypt
public Secret encrypt(byte[] plain, Charset charset) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidAlgorithmParameterException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException
-
decrypt
public char[] decrypt(Secret secret) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException
-
getService
public Service getService()
-
clear
public void clear()
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable
-
-