beam

Basic Encryption Algorithm Module - BEAM. BEAM is a light weight Java library to encrypt and decrypt data. Created 2019 by Philip Heyse.

Лицензия

Лицензия

Категории

Категории

IDE Инструменты разработки
Группа

Группа

de.bright-side.beam
Идентификатор

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

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

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

1.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

beam
Basic Encryption Algorithm Module - BEAM. BEAM is a light weight Java library to encrypt and decrypt data. Created 2019 by Philip Heyse.
Ссылка на сайт

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

https://github.com/pheyse/BEAM
Организация-разработчик

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

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

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

https://github.com/pheyse/BEAM

Скачать beam

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

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

Зависимости

test (1)

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

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

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

BEAM (Basic Encryption Algorithm Module)

Created 2019 by Philip Heyse

Description

BEAM is a light weight Java library to encrypt and decrypt data. Security level of the encryption: "A government agency can break it. Your Mom can't." Unless your Mom works for a government agency or is a hacker ;-)

Approach

BEAM combines three mechanisms for encryption:

  1. From the provided password a longer password is generated
  2. Bytes are shifted depending on the value of the password bytes.
  3. Blocks are created and the position of the bytes in the block depends on the password bytes. Remaining bytes in the block are filled with random data.

License

Apace V2

Usage examples

Encrypt and decrypt strings

Beam beam = new Beam("myPassword");
String encryptedText = beam.encrypt("my text"); // creates a string such as 8087ED5FBB314E9F84B968AED20089...
String decryptedText = beam.decrypt(encryptedText); // produces "my text" again 

Encrypt and decrypt byte arrays

Beam beam = new Beam("myPassword");
byte[] myBytes = {(byte)10, (byte)11, (byte)12};
byte[] encryptedBytes =  beam.encrypt(myBytes);
byte[] decryptedBytes =  beam.decrypt(encryptedBytes);

Encrypt stream

Beam beam = new Beam("myPassword");
beam.encrypt(inputStreamWithPlainData, encryptedOutputStream, null);

Decrypt stream

Beam beam = new Beam("myPassword");
beam.decrypt(inputStreamWithEncryptedData, decryptedOutputStream, null);

Password as byte array

byte[] myPasswordBytes = {(byte)0, (byte)1, (byte)2, (byte)3, (byte)4, (byte)5, (byte)6, (byte)7};
Beam beam = new Beam(myPasswordBytes);

Password providing the block length

int blockLength = 64;
Beam beam = new Beam("myPassword", blockLength);

Including via Maven

[...]
		<dependency>
			<groupId>de.bright-side.beam</groupId>
			<artifactId>beam</artifactId>
			<version>1.0.1</version>
		</dependency>
[...]

Change History

Version 1.0.0 (2019-08-20)

  • first version

Version 1.0.1 (2019-09-12)

  • removed dependency with "javax.xml.bind.DatatypeConverter" which is included in the JDK/JRE but is missing on Android

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

Версия
1.0.1