password-hashing

A library for password hashing by following current standards.

Лицензия

Лицензия

Группа

Группа

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

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

password-hashing
Последняя версия

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

0.2.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

password-hashing
A library for password hashing by following current standards.
Ссылка на сайт

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

https://github.com/chrix75/password-hashing
Система контроля версий

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

https://github.com/chrix75/password-hashing

Скачать password-hashing

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

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

Зависимости

test (1)

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

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

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

password-hashing

This Java library provides a way for password hashing.

Usage

The usage of this library rests on 2 classes. The first one is the Salt that returns a random salt.

The second one is Hash that uses the previously computed salt to process the password hashing.

Maven dependency

<dependency>
  <groupId>com.github.chrix75</groupId>
  <artifactId>password-hashing</artifactId>
  <version>0.1.0</version>
</dependency>

Examples

Getting a salt

Salt salt = new Salt(16);
String encodedSalt = salt.toString();

The toString method returns the salt value into a base 64 encoded string. It's useful for saving the salt value.

Hashing a password

Hash hash = new Hash("PASSWORD", salt);
String encodedPassword = hash.toString();

The toString method returns the hashed password into a base 64 encoded string.

Checking password correctness

PasswordChecker checker = new PasswordChecker(encodedPassword, "PASSWORD", encodedSalt);
assertTrue(checker.isCorrect());

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

Версия
0.2.0
0.1.0