public class GarlicMessageParser extends Object
| Constructor and Description |
|---|
GarlicMessageParser(RouterContext context)Create a garlic message parser |
| Modifier and Type | Method and Description |
|---|---|
(package private) CloveSet | getGarlicCloves(GarlicMessage message,
PrivateKey elgKey,
PrivateKey ecKey,
SessionKeyManager skm)Supports both ELGAMAL_2048 and ECIES_X25519. |
(package private) CloveSet | getGarlicCloves(GarlicMessage message,
PrivateKey encryptionKey,
SessionKeyManager skm)Supports ELGAMAL_2048, ECIES_X25519, and PQ |
CloveSet | readCloveSet(byte[] data,
int offset)ElGamal only |
public GarlicMessageParser(RouterContext context)
context - the router contextCloveSet getGarlicCloves(GarlicMessage message, PrivateKey elgKey, PrivateKey ecKey, SessionKeyManager skm)
message - the garlic message to decryptelgKey - must be ElG OR PQ, non-nullecKey - must be EC, non-nullskm - use tags from this session key managerCloveSet getGarlicCloves(GarlicMessage message, PrivateKey encryptionKey, SessionKeyManager skm)
message - the garlic message to decryptencryptionKey - either type TODO need both for muxedskm - use tags from this session key managerpublic CloveSet readCloveSet(byte[] data, int offset) throws DataFormatException
data - the raw data to read fromoffset - where in data to startDataFormatException - if the data is malformed