Top Fields Constructors Methods
org.freedesktop.secret

public Class TransportEncryption

extends Object
implements AutoCloseable
Class Inheritance
All Implemented Interfaces
java.lang.AutoCloseable
Imports
at.favre.lib.crypto.HKDF, org.freedesktop.dbus.ObjectPath, org.freedesktop.dbus.connections.impl.DBusConnection, .DBusConnectionBuilder, org.freedesktop.dbus.exceptions.DBusException, org.freedesktop.dbus.types.Variant, javax.crypto.*, javax.crypto.interfaces.DHPublicKey, javax.crypto.spec.DHParameterSpec, .DHPublicKeySpec, .IvParameterSpec, .SecretKeySpec, javax.security.auth.DestroyFailedException, java.math.BigInteger, java.nio.charset.Charset, .StandardCharsets, java.security.*, java.security.spec.InvalidKeySpecException

Field Summary

Modifier and TypeField and Description
public static final int
private DHParameterSpec
private KeyPair
public static final int
private PrivateKey
private PublicKey
private Service
private SecretKey
private byte[]

Constructor Summary

AccessConstructor and Description
public
public
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
close()

Implements java.lang.AutoCloseable.close.

Closes this resource, relinquishing any underlying resources.

public char[]
decrypt(Secret secret)

public Secret
public Secret
encrypt(byte[] plain, Charset charset)

private static BigInteger
fromBinary(byte[] bytes)

public void
public Service
public void
public boolean
private static int
toBytes(int bits)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

AES_BITSback to summary
public static final int AES_BITS
dhParametersback to summary
private DHParameterSpec dhParameters
keypairback to summary
private KeyPair keypair
PRIVATE_VALUE_BITSback to summary
public static final int PRIVATE_VALUE_BITS
privateKeyback to summary
private PrivateKey privateKey
publicKeyback to summary
private PublicKey publicKey
serviceback to summary
private Service service
sessionKeyback to summary
private SecretKey sessionKey
ybback to summary
private byte[] yb

Constructor Detail

TransportEncryptionback to summary
public TransportEncryption() throws DBusException
TransportEncryptionback to summary
public TransportEncryption(DBusConnection connection)
TransportEncryptionback to summary
public TransportEncryption(Service service)

Method Detail

clearback to summary
public void clear()
closeback to summary
public void close()

Implements java.lang.AutoCloseable.close.

Doc from java.lang.AutoCloseable.close.

Closes this resource, relinquishing any underlying resources. This method is invoked automatically on objects managed by the try-with-resources statement.

Annotations
@Override
decryptback to summary
public char[] decrypt(Secret secret) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException
encryptback to summary
public Secret encrypt(CharSequence plain) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidAlgorithmParameterException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException
encryptback to summary
public Secret encrypt(byte[] plain, Charset charset) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidAlgorithmParameterException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException
fromBinaryback to summary
private static BigInteger fromBinary(byte[] bytes)
generateSessionKeyback to summary
public void generateSessionKey() throws NoSuchAlgorithmException, InvalidKeySpecException, InvalidKeyException
getServiceback to summary
public Service getService()
initializeback to summary
public void initialize() throws NoSuchAlgorithmException, InvalidAlgorithmParameterException
openSessionback to summary
public boolean openSession() throws DBusException
toBytesback to summary
private static int toBytes(int bits)