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(org.freedesktop.dbus.connections.impl.DBusConnection connection)TransportEncryption(Service service) -
Method Summary
Modifier and Type Method Description voidclear()voidclose()char[]decrypt(Secret secret)Secretencrypt(byte[] plain, Charset charset)Secretencrypt(CharSequence plain)voidgenerateSessionKey()ServicegetService()voidinitialize()voidopenSession()
-
Field Details
-
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 Details
-
TransportEncryption
public TransportEncryption() throws org.freedesktop.dbus.exceptions.DBusException- Throws:
org.freedesktop.dbus.exceptions.DBusException
-
TransportEncryption
public TransportEncryption(org.freedesktop.dbus.connections.impl.DBusConnection connection) -
TransportEncryption
-
-
Method Details
-
initialize
-
openSession
public void openSession() throws org.freedesktop.dbus.exceptions.DBusException- Throws:
org.freedesktop.dbus.exceptions.DBusException
-
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
-
clear
public void clear() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-