Package net.i2p.router.message
Class GarlicMessageParser
java.lang.Object
net.i2p.router.message.GarlicMessageParser
Read a GarlicMessage, decrypt it, and return the resulting CloveSet.
Thread-safe, does not contain any state.
Public as it's now in the RouterContext.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) CloveSet
getGarlicCloves
(GarlicMessage message, PrivateKey encryptionKey, SessionKeyManager skm) Supports both ELGAMAL_2048 and ECIES_X25519.(package private) CloveSet
getGarlicCloves
(GarlicMessage message, PrivateKey elgKey, PrivateKey ecKey, SessionKeyManager skm) Supports both ELGAMAL_2048 and ECIES_X25519.readCloveSet
(byte[] data, int offset) ElGamal only
-
Constructor Details
-
GarlicMessageParser
-
-
Method Details
-
getGarlicCloves
Supports both ELGAMAL_2048 and ECIES_X25519.- Parameters:
encryptionKey
- either typeskm
- use tags from this session key manager- Returns:
- null on error
-
getGarlicCloves
CloveSet getGarlicCloves(GarlicMessage message, PrivateKey elgKey, PrivateKey ecKey, SessionKeyManager skm) Supports both ELGAMAL_2048 and ECIES_X25519.- Parameters:
elgKey
- must be ElG, non-nullecKey
- must be EC, non-nullskm
- use tags from this session key manager- Returns:
- null on error
- Since:
- 0.9.44
-
readCloveSet
ElGamal only- Parameters:
offset
- where in data to start- Returns:
- non-null, throws on all errors
- Throws:
DataFormatException
- Since:
- public since 0.9.44
-