community-id-java

A Java implementation of the Community ID flow hashing standard (https://github.com/corelight/community-id-spec)

Лицензия

Лицензия

Категории

Категории

Java Языки программирования Unity Прикладные библиотеки Game Development
Группа

Группа

com.rapid7.communityid
Идентификатор

Идентификатор

community-id-java
Последняя версия

Последняя версия

2.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

community-id-java
A Java implementation of the Community ID flow hashing standard (https://github.com/corelight/community-id-spec)
Ссылка на сайт

Ссылка на сайт

https://github.com/rapid7/community-id-java
Организация-разработчик

Организация-разработчик

Rapid 7, Inc.
Система контроля версий

Система контроля версий

https://github.com/rapid7/community-id-java

Скачать community-id-java

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.rapid7.communityid/community-id-java/ -->
<dependency>
    <groupId>com.rapid7.communityid</groupId>
    <artifactId>community-id-java</artifactId>
    <version>2.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.rapid7.communityid/community-id-java/
implementation 'com.rapid7.communityid:community-id-java:2.0.1'
// https://jarcasting.com/artifacts/com.rapid7.communityid/community-id-java/
implementation ("com.rapid7.communityid:community-id-java:2.0.1")
'com.rapid7.communityid:community-id-java:jar:2.0.1'
<dependency org="com.rapid7.communityid" name="community-id-java" rev="2.0.1">
  <artifact name="community-id-java" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.rapid7.communityid', module='community-id-java', version='2.0.1')
)
libraryDependencies += "com.rapid7.communityid" % "community-id-java" % "2.0.1"
[com.rapid7.communityid/community-id-java "2.0.1"]

Зависимости

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12

Модули Проекта

Данный проект не имеет модулей.

community-id-java

This package provides a Java 8 implementation of the open Community ID flow hashing standard.

This library supports IPV4 and IPV6 addresses and TCP, UDP, and STCP network protocols. It does not support ICMP protocols.

How it works

The Community ID Generator creates a Community ID string by taking in a protocol, source IP address, source port, destination address, and destination port. It creates two IpPortPair objects and sorts them in a deterministic order. It then packs the necessary bytes in NBO order, and produces a 20-byte SHA1 digest. Then, base64 encodes it or turns it into a hexadecimal string depending on configuration. It appends the value to "1:" for version 1.

The Community ID generator is configurable to take in a seed value to be packed and encoded as well as a boolean for base64 encoding. Only the first two bytes of the seed value will be used in the Community ID.

Getting community-id-java

To add community-id-java to your Maven project, use the following:

<dependency>
    <groupId>com.rapid7.communityid</groupId>
    <artifactId>community-id-java</artifactId>
    <version>2.0.0</version>
</dependency>

Example of creating a Community ID:

CommunityIdGenerator generator = new CommunityIdGenerator();  

//The default constructor will set seed to 0 and base64 to true

String result = generator.generateCommunityId(Protocol.UDP, 
    InetAddress.getByName("192.168.1.52"), 54585, InetAddress.getByName("8.8.8.8"), 53);

result will look like:

"1:Q9We8WO3piVF8yEQBNJF4uiSVrI=".
com.rapid7.communityid

Rapid7

Версии библиотеки

Версия
2.0.1
2.0.0