From 34a2430725332e2ed389847f4483345db7a3881a Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Thu, 16 Jun 2016 17:39:17 +1000 Subject: [PATCH] Initial commit to create the repository --- .gitignore | 3 + NoiseJava/.gitignore | 2 + .../southernstorm/noise/protocol/Noise.java | 81 +++++++++++++++++++ 3 files changed, 86 insertions(+) create mode 100644 .gitignore create mode 100644 NoiseJava/.gitignore create mode 100644 NoiseJava/src/com/southernstorm/noise/protocol/Noise.java diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f2fdfce --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.classpath +.metadata +.project diff --git a/NoiseJava/.gitignore b/NoiseJava/.gitignore new file mode 100644 index 0000000..543ab98 --- /dev/null +++ b/NoiseJava/.gitignore @@ -0,0 +1,2 @@ +.settings +bin diff --git a/NoiseJava/src/com/southernstorm/noise/protocol/Noise.java b/NoiseJava/src/com/southernstorm/noise/protocol/Noise.java new file mode 100644 index 0000000..25997bc --- /dev/null +++ b/NoiseJava/src/com/southernstorm/noise/protocol/Noise.java @@ -0,0 +1,81 @@ +package com.southernstorm.noise.protocol; + +/** + * Constants for the Noise protocol library. + */ +public final class Noise { + + /** + * Handshake pattern identifier that indicates "no pattern". + */ + public static final int PATTERN_NONE = 0; + /** + * Category for handshake patterns. + */ + public static final int PATTERN_CATEGORY = 0x5000; + /** + * Handshake pattern identifier for "N". + */ + public static final int PATTERN_N = 0x5001; + /** + * Handshake pattern identifier for "X". + */ + public static final int PATTERN_X = 0x5002; + /** + * Handshake pattern identifier for "K". + */ + public static final int PATTERN_K = 0x5003; + /** + * Handshake pattern identifier for "NN". + */ + public static final int PATTERN_NN = 0x5004; + /** + * Handshake pattern identifier for "NK". + */ + public static final int PATTERN_NK = 0x5005; + /** + * Handshake pattern identifier for "NX". + */ + public static final int PATTERN_NX = 0x5006; + /** + * Handshake pattern identifier for "XN". + */ + public static final int PATTERN_XN = 0x5007; + /** + * Handshake pattern identifier for "XK". + */ + public static final int PATTERN_XK = 0x5008; + /** + * Handshake pattern identifier for "XX". + */ + public static final int PATTERN_XX = 0x5009; + /** + * Handshake pattern identifier for "KN". + */ + public static final int PATTERN_KN = 0x500A; + /** + * Handshake pattern identifier for "KK". + */ + public static final int PATTERN_KK = 0x500B; + /** + * Handshake pattern identifier for "KX". + */ + public static final int PATTERN_KX = 0x500C; + /** + * Handshake pattern identifier for "IN". + */ + public static final int PATTERN_IN = 0x500D; + /** + * Handshake pattern identifier for "IK". + */ + public static final int PATTERN_IK = 0x500E; + /** + * Handshake pattern identifier for "IX". + */ + public static final int PATTERN_IX = 0x500F; + /** + * Handshake pattern identifier for "XXfallback". + */ + public static final int PATTERN_XX_FALLBACK = 0x5010; + +}