java.lang.Object
com.southernstorm.noise.protocol.Pattern

class Patternextends Object
Information about all supported handshake patterns.
  • Field Details

    • S

      public static final short S
      Token code: S
      See Also:
    • E

      public static final short E
      Token code: E
      See Also:
    • EE

      public static final short EE
      Token code: EE
      See Also:
    • ES

      public static final short ES
      Token code: ES
      See Also:
    • SE

      public static final short SE
      Token code: SE
      See Also:
    • SS

      public static final short SS
      Token code: SS
      See Also:
    • F

      public static final short F
      Token code: F
      See Also:
    • FF

      public static final short FF
      Token code: FF
      See Also:
    • FLIP_DIR

      public static final short FLIP_DIR
      Token code: FLIP_DIR
      See Also:
    • FLAG_LOCAL_STATIC

      public static final short FLAG_LOCAL_STATIC
      Flag bit: local static
      See Also:
    • FLAG_LOCAL_EPHEMERAL

      public static final short FLAG_LOCAL_EPHEMERAL
      Flag bit: local ephemeral
      See Also:
    • FLAG_LOCAL_REQUIRED

      public static final short FLAG_LOCAL_REQUIRED
      Flag bit: local required
      See Also:
    • FLAG_LOCAL_EPHEM_REQ

      public static final short FLAG_LOCAL_EPHEM_REQ
      Flag bit: local ephemeral required
      See Also:
    • FLAG_LOCAL_HYBRID

      public static final short FLAG_LOCAL_HYBRID
      Flag bit: local hybrid
      See Also:
    • FLAG_LOCAL_HYBRID_REQ

      public static final short FLAG_LOCAL_HYBRID_REQ
      Flag bit: local hybrid required
      See Also:
    • FLAG_REMOTE_STATIC

      public static final short FLAG_REMOTE_STATIC
      Flag bit: remote static
      See Also:
    • FLAG_REMOTE_EPHEMERAL

      public static final short FLAG_REMOTE_EPHEMERAL
      Flag bit: remote ephemeral
      See Also:
    • FLAG_REMOTE_REQUIRED

      public static final short FLAG_REMOTE_REQUIRED
      Flag bit: remote required
      See Also:
    • FLAG_REMOTE_EPHEM_REQ

      public static final short FLAG_REMOTE_EPHEM_REQ
      Flag bit: remote ephemeral required
      See Also:
    • FLAG_REMOTE_HYBRID

      public static final short FLAG_REMOTE_HYBRID
      Flag bit: remote hybrid
      See Also:
    • FLAG_REMOTE_HYBRID_REQ

      public static final short FLAG_REMOTE_HYBRID_REQ
      Flag bit: remote hybrid required
      See Also:
    • noise_pattern_N

      private static final short[] noise_pattern_N
      Token sequence of the Noise N handshake pattern.
    • noise_pattern_XK

      private static final short[] noise_pattern_XK
      Token sequence of the Noise XK handshake pattern.
    • noise_pattern_IK

      private static final short[] noise_pattern_IK
      Token sequence of the Noise IK handshake pattern.
    • noise_pattern_IKhfs

      private static final short[] noise_pattern_IKhfs
      The flags of the IKhfs handshake pattern.
    • noise_pattern_XKhfs

      private static final short[] noise_pattern_XKhfs
      The flags of the XKhfs handshake pattern.
  • Constructor Details

    • Pattern

      private Pattern()
      Private constructor prevents instantiation
  • Method Details

    • lookup

      public static short[] lookup(String name)
      Look up the description information for a pattern.
      Parameters:
      name - The name of the pattern.
      Returns:
      The pattern description or null.
    • reverseFlags

      public static short reverseFlags(short flags)
      Reverses the local and remote flags for a pattern.
      Parameters:
      flags - The flags, assuming that the initiator is "local".
      Returns:
      The reversed flags, with the responder now being "local".