congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
IkePhase1Key.setKeyHash
Code IndexAdd Tabnine to your IDE (free)

How to use
setKeyHash
method
in
org.batfish.datamodel.IkePhase1Key

Best Java code snippets using org.batfish.datamodel.IkePhase1Key.setKeyHash (Showing top 4 results out of 315)

origin: batfish/batfish

@Nonnull
private static IkePhase1Key toIkePhase1PreSharedKey(
  IpsecTunnel ipsecTunnel, Ip remoteIdentity, String localInterface) {
 IkePhase1Key ikePhase1Key = new IkePhase1Key();
 ikePhase1Key.setKeyType(IkeKeyType.PRE_SHARED_KEY);
 ikePhase1Key.setKeyHash(ipsecTunnel.getIkePreSharedKeyHash());
 ikePhase1Key.setRemoteIdentity(remoteIdentity.toIpSpace());
 ikePhase1Key.setLocalInterface(localInterface);
 return ikePhase1Key;
}
origin: batfish/batfish

/**
 * Converts {@link IkePolicy} to {@link IkePhase1Policy} and puts the used pre-shared key as a
 * {@link IkePhase1Key} in the passed-in {@code ikePhase1Keys}
 */
private static IkePhase1Policy toIkePhase1Policy(
  IkePolicy ikePolicy, ImmutableSortedMap.Builder<String, IkePhase1Key> ikePhase1Keys) {
 String name = ikePolicy.getName();
 IkePhase1Policy ikePhase1Policy = new IkePhase1Policy(name);
 // pre-shared-key
 IkePhase1Key ikePhase1Key = new IkePhase1Key();
 ikePhase1Key.setKeyType(IkeKeyType.PRE_SHARED_KEY);
 ikePhase1Key.setKeyHash(ikePolicy.getPreSharedKeyHash());
 ikePhase1Keys.put(String.format("~IKE_PHASE1_KEY_%s~", ikePolicy.getName()), ikePhase1Key);
 ikePhase1Policy.setIkePhase1Key(ikePhase1Key);
 ImmutableList.Builder<String> ikePhase1ProposalBuilder = ImmutableList.builder();
 // ike proposals
 ikePolicy.getProposals().forEach(ikePhase1ProposalBuilder::add);
 ikePhase1Policy.setIkePhase1Proposals(ikePhase1ProposalBuilder.build());
 return ikePhase1Policy;
}
origin: batfish/batfish

static IkePhase1Key toIkePhase1Key(Keyring keyring) {
 IkePhase1Key ikePhase1Key = new IkePhase1Key();
 ikePhase1Key.setKeyHash(keyring.getKey());
 ikePhase1Key.setKeyType(IkeKeyType.PRE_SHARED_KEY);
 ikePhase1Key.setLocalInterface(keyring.getLocalInterfaceName());
 if (keyring.getRemoteIdentity() != null) {
  ikePhase1Key.setRemoteIdentity(keyring.getRemoteIdentity().toIpSpace());
 }
 return ikePhase1Key;
}
origin: batfish/batfish

ikePhase1Key.setKeyHash(ipsecPeer.getAuthenticationPreSharedSecretHash());
org.batfish.datamodelIkePhase1KeysetKeyHash

Popular methods of IkePhase1Key

  • <init>
  • getKeyHash
  • getKeyType
  • getLocalInterface
  • match
    Returns true if this IkePhase1Key can be used with the given localInterface and matchIdentity
  • setKeyType
  • setLocalInterface
  • setRemoteIdentity

Popular in Java

  • Reading from database using SQL prepared statement
  • setScale (BigDecimal)
  • getResourceAsStream (ClassLoader)
  • getContentResolver (Context)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Collectors (java.util.stream)
  • JLabel (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top Vim plugins
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