Package net.i2p.router.message
Class GarlicMessageParser
- java.lang.Object
-
- net.i2p.router.message.GarlicMessageParser
-
public class GarlicMessageParser extends Object
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
Constructors Constructor Description GarlicMessageParser(RouterContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (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.CloveSet
readCloveSet(byte[] data, int offset)
ElGamal only
-
-
-
Constructor Detail
-
GarlicMessageParser
public GarlicMessageParser(RouterContext context)
-
-
Method Detail
-
getGarlicCloves
CloveSet getGarlicCloves(GarlicMessage message, PrivateKey encryptionKey, SessionKeyManager skm)
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
public CloveSet readCloveSet(byte[] data, int offset) throws DataFormatException
ElGamal only- Parameters:
offset
- where in data to start- Returns:
- non-null, throws on all errors
- Throws:
DataFormatException
- Since:
- public since 0.9.44
-
-