public class HybridEncryption extends Object
HybridEncryption class implements the "hybrid encryption" scheme
as described in section 0.3 of the main Tor specification (tor-spec.txt).| Constructor and Description |
|---|
HybridEncryption()
Create a new
HybridEncryption instance which can be used for performing
"hybrid encryption" operations as described in the main Tor specification (tor-spec.txt). |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
decrypt(byte[] data,
TorPrivateKey privateKey)
Decrypt the contents of the byte array
data with the given TorPrivateKey
according to the "hybrid encryption" scheme described in the main Tor specification (tor-spec.txt). |
byte[] |
encrypt(byte[] data,
TorPublicKey publicKey)
Encrypt the entire contents of the byte array
data with the given TorPublicKey
according to the "hybrid encryption" scheme described in the main Tor specification (tor-spec.txt). |
public HybridEncryption()
HybridEncryption instance which can be used for performing
"hybrid encryption" operations as described in the main Tor specification (tor-spec.txt).public byte[] encrypt(byte[] data,
TorPublicKey publicKey)
data with the given TorPublicKey
according to the "hybrid encryption" scheme described in the main Tor specification (tor-spec.txt).data - The bytes to be encrypted.publicKey - The public key to use for encryption.public byte[] decrypt(byte[] data,
TorPrivateKey privateKey)
data with the given TorPrivateKey
according to the "hybrid encryption" scheme described in the main Tor specification (tor-spec.txt).data - Encrypted data to decrypt.privateKey - The private key to use to decrypt the data.Copyright © 2015. All rights reserved.