forked from I2P_Developers/i2p.i2p
javadocs
This commit is contained in:
@@ -461,6 +461,8 @@ public class ElGamalAESEngine {
|
|||||||
* No new session key
|
* No new session key
|
||||||
* No current tag (encrypt as new session)
|
* No current tag (encrypt as new session)
|
||||||
*
|
*
|
||||||
|
* @param tagsForDelivery session tags to be associated with the key or null;
|
||||||
|
* 200 max enforced at receiver
|
||||||
* @deprecated unused
|
* @deprecated unused
|
||||||
*/
|
*/
|
||||||
public byte[] encrypt(byte data[], PublicKey target, SessionKey key, Set tagsForDelivery, long paddedSize) {
|
public byte[] encrypt(byte data[], PublicKey target, SessionKey key, Set tagsForDelivery, long paddedSize) {
|
||||||
@@ -498,6 +500,8 @@ public class ElGamalAESEngine {
|
|||||||
* - random bytes, padding the total size to greater than paddedSize with a mod 16 = 0
|
* - random bytes, padding the total size to greater than paddedSize with a mod 16 = 0
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
* @param tagsForDelivery session tags to be associated with the key or null;
|
||||||
|
* 200 max enforced at receiver
|
||||||
*/
|
*/
|
||||||
private byte[] encryptNewSession(byte data[], PublicKey target, SessionKey key, Set tagsForDelivery,
|
private byte[] encryptNewSession(byte data[], PublicKey target, SessionKey key, Set tagsForDelivery,
|
||||||
SessionKey newKey, long paddedSize) {
|
SessionKey newKey, long paddedSize) {
|
||||||
@@ -564,6 +568,8 @@ public class ElGamalAESEngine {
|
|||||||
* - random bytes, padding the total size to greater than paddedSize with a mod 16 = 0
|
* - random bytes, padding the total size to greater than paddedSize with a mod 16 = 0
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
* @param tagsForDelivery session tags to be associated with the key or null;
|
||||||
|
* 200 max enforced at receiver
|
||||||
*/
|
*/
|
||||||
private byte[] encryptExistingSession(byte data[], PublicKey target, SessionKey key, Set tagsForDelivery,
|
private byte[] encryptExistingSession(byte data[], PublicKey target, SessionKey key, Set tagsForDelivery,
|
||||||
SessionTag currentTag, SessionKey newKey, long paddedSize) {
|
SessionTag currentTag, SessionKey newKey, long paddedSize) {
|
||||||
@@ -619,12 +625,20 @@ public class ElGamalAESEngine {
|
|||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* Note: package private for ElGamalTest.testAES()
|
* Note: package private for ElGamalTest.testAES()
|
||||||
|
*
|
||||||
|
* @param tagsForDelivery session tags to be associated with the key or null;
|
||||||
|
* 200 max enforced at receiver
|
||||||
*/
|
*/
|
||||||
final byte[] encryptAESBlock(byte data[], SessionKey key, byte[] iv, Set tagsForDelivery, SessionKey newKey,
|
final byte[] encryptAESBlock(byte data[], SessionKey key, byte[] iv, Set tagsForDelivery, SessionKey newKey,
|
||||||
long paddedSize) {
|
long paddedSize) {
|
||||||
return encryptAESBlock(data, key, iv, tagsForDelivery, newKey, paddedSize, 0);
|
return encryptAESBlock(data, key, iv, tagsForDelivery, newKey, paddedSize, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param tagsForDelivery session tags to be associated with the key or null;
|
||||||
|
* 200 max enforced at receiver
|
||||||
|
*/
|
||||||
private final byte[] encryptAESBlock(byte data[], SessionKey key, byte[] iv, Set tagsForDelivery, SessionKey newKey,
|
private final byte[] encryptAESBlock(byte data[], SessionKey key, byte[] iv, Set tagsForDelivery, SessionKey newKey,
|
||||||
long paddedSize, int prefixBytes) {
|
long paddedSize, int prefixBytes) {
|
||||||
//_log.debug("iv for encryption: " + DataHelper.toString(iv, 16));
|
//_log.debug("iv for encryption: " + DataHelper.toString(iv, 16));
|
||||||
|
|||||||
@@ -393,7 +393,8 @@ public class DataHelper {
|
|||||||
* A more efficient Properties.load
|
* A more efficient Properties.load
|
||||||
*
|
*
|
||||||
* Some of the other differences:
|
* Some of the other differences:
|
||||||
* - This does not process or drop backslashes
|
* - UTF-8 encoding, not ISO-8859-1
|
||||||
|
* - No escaping! This does not process or drop backslashes
|
||||||
* - '#' or ';' starts a comment line, but '!' does not
|
* - '#' or ';' starts a comment line, but '!' does not
|
||||||
* - Leading whitespace is not trimmed
|
* - Leading whitespace is not trimmed
|
||||||
* - '=' is the only key-termination character (not ':' or whitespace)
|
* - '=' is the only key-termination character (not ':' or whitespace)
|
||||||
|
|||||||
@@ -172,17 +172,17 @@ public class GarlicMessageBuilder {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* used by TestJob and directly above
|
* used by TestJob and directly above
|
||||||
|
* and for encrypting DatabaseLookupMessages
|
||||||
*
|
*
|
||||||
* @param ctx scope
|
* @param ctx scope
|
||||||
* @param config how/what to wrap
|
* @param config how/what to wrap
|
||||||
* @param wrappedKey unused - why??
|
* @param wrappedKey unused - why??
|
||||||
* @param wrappedTags Output parameter that will be filled with the sessionTags used.
|
* @param wrappedTags New tags to be sent along with the message.
|
||||||
If non-empty on return you must call skm.tagsDelivered() when sent
|
* 200 max enforced at receiver; null OK
|
||||||
and then call skm.tagsAcked() or skm.failTags() later.
|
|
||||||
* @param target public key of the location being garlic routed to (may be null if we
|
* @param target public key of the location being garlic routed to (may be null if we
|
||||||
* know the encryptKey and encryptTag)
|
* know the encryptKey and encryptTag)
|
||||||
* @param encryptKey sessionKey used to encrypt the current message
|
* @param encryptKey sessionKey used to encrypt the current message, non-null
|
||||||
* @param encryptTag sessionTag used to encrypt the current message
|
* @param encryptTag sessionTag used to encrypt the current message, null to force ElG
|
||||||
* @throws IllegalArgumentException on error
|
* @throws IllegalArgumentException on error
|
||||||
*/
|
*/
|
||||||
public static GarlicMessage buildMessage(RouterContext ctx, GarlicConfig config, SessionKey wrappedKey, Set<SessionTag> wrappedTags,
|
public static GarlicMessage buildMessage(RouterContext ctx, GarlicConfig config, SessionKey wrappedKey, Set<SessionTag> wrappedTags,
|
||||||
|
|||||||
Reference in New Issue
Block a user