easyhash

The easiest way to generate HEX hashs in Groovy and Java

Лицензия

Лицензия

Группа

Группа

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

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

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

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

1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

easyhash
The easiest way to generate HEX hashs in Groovy and Java
Система контроля версий

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

http://github.com/poiati/easyhash

Скачать easyhash

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

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

Зависимости

test (1)

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

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

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

Easyhash

The easyhash is an utility to easily generate cryptographic hashes in it's hexadecimal form.

Currently two cryptographic hash function are supported:

  • MD5
  • SHA-1

Usage

You can use easyhash in Java or Groovy programs.

Java

First, Put the easyhash jar into the classpath and then:

import static com.lazythought.easyhash.HashGenerator.*;
...
assert "ab07acbb1e496801937adfa772424bf7".equals(HashGenerator.md5("foo bar baz"));
assert "c7567e8b39e2428e38bf9c9226ac68de4c67dc39".equals(HashGenerator.sha1("foo bar baz"));
...

Groovy

With Groovy you can use the @Grab AST:

@Grab('com.lazythought:easyhash:1.0')
import static com.lazythought.easyhash.HashGenerator.*

assert 'ab07acbb1e496801937adfa772424bf7' == md5('foo bar baz')
assert 'c7567e8b39e2428e38bf9c9226ac68de4c67dc39' == sha1('foo bar baz')

There is also the HashCategory option:

@Grab('com.lazythought:easyhash:1.0')
import com.lazythought.easyhash.HashCategory

use(HashCategory) {
    assert 'b071ed8a2de56ecd5958305641a81755' == 'frodo bags'.md5()
    assert 'b6b5ece040fd0c467cb189a284c6e7c752c747f5' == 'frodo bags'.sha1()
}

Build

Build with Gradle ( http://gradle.org/ ):

# gradle build

Support & Contact

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

Версия
1.0