Tabnine Logo
SessionConfig.signSessionConfig
Code IndexAdd Tabnine to your IDE (free)

How to use
signSessionConfig
method
in
net.i2p.data.i2cp.SessionConfig

Best Java code snippets using net.i2p.data.i2cp.SessionConfig.signSessionConfig (Showing top 3 results out of 315)

origin: i2p/i2p.i2p

  cfg.signSessionConfig(session.getPrivateKey());
} catch (DataFormatException dfe) {
  throw new I2PSessionException("Unable to sign the session config", dfe);
origin: i2p/i2p.i2p

public DataStructure createDataStructure() throws DataFormatException {
  SessionConfig cfg = new SessionConfig((Destination)(new DestinationTest()).createDataStructure());
  cfg.setSignature((Signature)(new SignatureTest()).createDataStructure());
  Properties options = new Properties();
  options.setProperty("routerHost", "localhost");
  options.setProperty("routerPort", "54321");
  options.setProperty("routerSecret", "blah");
  cfg.setOptions(options);
  cfg.signSessionConfig((SigningPrivateKey)(new SigningPrivateKeyTest()).createDataStructure());
  return cfg; 
}
public DataStructure createStructureToRead() { return new SessionConfig(); }
origin: i2p/i2p.i2p

/** 
 * Send all the messages that a client needs to send to a router to establish
 * a new session.  
 */
public void connect(I2PSessionImpl session) throws I2PSessionException {
  updateBandwidth(session);
  CreateSessionMessage msg = new CreateSessionMessage();
  SessionConfig cfg = new SessionConfig(session.getMyDestination());
  cfg.setOptions(getRouterOptions(session));
  if (session.isOffline()) {
    cfg.setOfflineSignature(session.getOfflineExpiration(),
                session.getTransientSigningPublicKey(),
                session.getOfflineSignature());
  }
  try {
    cfg.signSessionConfig(session.getPrivateKey());
  } catch (DataFormatException dfe) {
    throw new I2PSessionException("Unable to sign the session config", dfe);
  }
  msg.setSessionConfig(cfg);
  session.sendMessage_unchecked(msg);
}
net.i2p.data.i2cpSessionConfigsignSessionConfig

Javadoc

Sign the structure using the supplied private key

Popular methods of SessionConfig

  • <init>
  • getDestination
    Retrieve the destination for which this session is supposed to connect
  • setOptions
    Configure the session with the given options; keys and values 255 bytes (not chars) max each Default
  • getCreationDate
    Determine when this session was authorized by the destination (so we can prevent replay attacks)
  • getOptions
    Retrieve any configuration options for the session
  • getSignature
  • setSignature
  • tooOld
    Misnamed, could be too old or too far in the future.
  • getBytes
  • getOfflineExpiration
    Get the offline expiration
  • getOfflineSignature
  • getTransientSigningPublicKey
  • getOfflineSignature,
  • getTransientSigningPublicKey,
  • readBytes,
  • setOfflineSignature,
  • verifySignature,
  • writeBytes

Popular in Java

  • Running tasks concurrently on multiple threads
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (Timer)
  • putExtra (Intent)
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • BoxLayout (javax.swing)
  • Join (org.hibernate.mapping)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now