Skip to content

Commit

Permalink
update cipher library (#3)
Browse files Browse the repository at this point in the history
* update cipher library

* update README.md

* Remove travis conf

* Remove codecov

* Create some more tests

* Refactoring

* Update pom in order to publish artifacts in mvn central repositories

* Update README.md

* Update README.md

* improve PasswordDeriveBytes syntax code
  • Loading branch information
Proteus1989 authored Aug 1, 2022
1 parent 5967d5a commit 0fdd310
Show file tree
Hide file tree
Showing 10 changed files with 562 additions and 670 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.idea
target
7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

67 changes: 46 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,65 +1,90 @@
[![Build Status](https://travis-ci.org/Proteus1989/Air-Explorer-Decrypter.svg?branch=master)](https://travis-ci.org/Proteus1989/Air-Explorer-Decrypter)
[![Codecov](https://img.shields.io/codecov/c/github/Proteus1989/Air-Explorer-Decrypter)](https://codecov.io/gh/Proteus1989/Air-Explorer-Decrypter)
[![license: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/Proteus1989/Air-Explorer-Decrypter/blob/master/LICENSE)
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/Proteus1989/Air-Explorer-Decrypter)](https://github.com/Proteus1989/Air-Explorer-Decrypter/releases/latest)
[![Maven Central](https://img.shields.io/maven-central/v/com.github.proteus1989/AirExplorerDecrypter.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.github.proteus1989%22%20AND%20a:%22AirExplorerDecrypter%22)
[![Github All Releases](https://img.shields.io/github/downloads/Proteus1989/Air-Explorer-Decrypter/total)](https://github.com/Proteus1989/Air-Explorer-Decrypter/releases)

# Air Explorer Decrypter
Java API able to decrypts Air Explorer encrypted files. This project includes simple graphic client binaries.

Java library able to decrypt Air Explorer encrypted files. This README includes simple graphic client binaries.

## Getting Started

### Prerequisites

At least, Oracle JRE 1.8 is needed.
At least, JDK 1.8 is needed.

### GUI Client

To run a GUI client just execute **AirExplorerFileDecrypter-v1.2.jar** file.<br>
[Download latest GUI client build](https://github.com/Proteus1989/Air-Explorer-Decrypter/releases/download/1.0.0/AirExplorerFileDecrypter-v1.2.jar)

### API Usage
### Library Usage

#### Importing the library

##### Maven

```
<dependency>
<groupId>com.github.proteus1989</groupId>
<artifactId>AirExplorerDecrypter</artifactId>
<version>1.0.1</version>
<version>2.0.0</version>
</dependency>
```

##### Gradle

```
implementation 'com.github.proteus1989:AirExplorerDecrypter:1.0.1'
implementation 'com.github.proteus1989:AirExplorerDecrypter:2.0.0'
```
#### Calling the API

#### Examples

- Decrypting file name
```java
AirExplorerDecrypterAPI.decryptName("encryptedFileName(.cloudencoded2)", "file_password")

```
AirExplorerDecrypter.decryptName("encryptedFileName(.cloudencoded2)", "file_password")
```

- Decrypting a file
```java
AirExplorerDecrypterAPI.decrytp(new File("file_path"), "file_password")

```
AirExplorerDecrypter.decrypt(new File("file_path"), "file_password")
```

- Decrypting a file into a specific directory

```
AirExplorerDecrypter.decrypt(new File("file_path"), new File("dst_folder"), "file_password")
```
```java
AirExplorerDecrypterAPI.decrytp(new File("file_path"), new File("dst_folder"), "file_password")

- Consuming an encrypted input stream, decrypt it and send it to a custom output stream

```
AirExplorerDecrypter.decrypt(your_input_stream, your_output_stream, "file_password")
```
```java
AirExplorerDecrypterAPI.decrytp(your_input_stream, your_output_stream, "file_password")

- Creating an AirExplorerInputStream to wrapper and consume an encrypted stream
```
InputStream AirExplorerInputStream = new AirExplorerInputStream(your_input_stream, "file_password")
```
[Download latest API build](https://github.com/Proteus1989/Air-Explorer-Decrypter/releases/latest)

[Download the latest build](https://github.com/Proteus1989/Air-Explorer-Decrypter/releases/latest)

## Authors

* **Antonio Suárez** - *Initial work* - [Proteus1989](https://github.com/Proteus1989)
* **Antonio Suárez** - *Initial work and maintainer* - [Proteus1989](https://github.com/Proteus1989)

See also the list of [contributors](https://github.com/Proteus1989/Air-Explorer-Decrypter/contributors) who participated in this project.
See also the list of [contributors](https://github.com/Proteus1989/Air-Explorer-Decrypter/contributors) who participated
in this project.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

## Acknowledgments

MS original PasswordDeriveBytes class contains a nonstandard extension of the PBKDF1 algorithm. Therefore, MS PasswordDeriveBytes is different of normal BKDF1.
Special thanks to **gilchris** for Java PasswordDeriveBytes port. Available at https://github.com/gilchris/PasswordDeriveBytesForJava.
MS original PasswordDeriveBytes class contains a nonstandard extension of the PBKDF1 algorithm. Therefore, MS
PasswordDeriveBytes is different of normal BKDF1.
Special thanks to **gilchris** for Java PasswordDeriveBytes port. Available
at https://github.com/gilchris/PasswordDeriveBytesForJava.
135 changes: 45 additions & 90 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,51 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.proteus1989</groupId>
<artifactId>AirExplorerDecrypter</artifactId>
<version>1.0.1</version>
<version>2.0.0</version>
<packaging>jar</packaging>
<name>Air Explorer Decrypter</name>
<description>Java API able to decrypt Air Explorer encrypted files</description>
<url>https://github.com/Proteus1989/Air-Explorer-Decrypter</url>

<developers>
<developer>
<id>Proteus1989</id>
<url>https://proteus1989.github.io/</url>
</developer>
</developers>

<licenses>
<license>
<name>MIT License</name>
<url>https://opensource.org/licenses/MIT</url>
<distribution>repo</distribution>
</license>
</licenses>

<issueManagement>
<url>https://github.com/Proteus1989/Air-Explorer-Decrypter/issues</url>
</issueManagement>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>


<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.8</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
Expand All @@ -54,7 +60,6 @@
</configuration>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
Expand All @@ -64,12 +69,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.1</version>
<version>3.4.0</version>
<configuration>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<phase>prepare-package</phase>
<goals>
<goal>jar</goal>
</goals>
Expand All @@ -79,7 +84,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.5</version>
<version>0.8.8</version>
<configuration>
<excludes>
<exclude>**/*PasswordDeriveBytes*</exclude>
Expand All @@ -100,42 +105,19 @@
</execution>
</executions>
</plugin>

<!-- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<localCheckout>true</localCheckout>
<pushChanges>false</pushChanges>
<mavenExecutorId>forked-path</mavenExecutorId>
<arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-provider-gitexe</artifactId>
<version>1.9.5</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
</configuration>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>default-deploy</id>
<phase>deploy</phase>
<phase>verify</phase>
<goals>
<goal>deploy</goal>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
Expand All @@ -144,55 +126,28 @@
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>-->

</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.5</version>
<scope>test</scope>
</dependency>
</dependencies>


<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<scm>
<connection>scm:git:git://github.com/Proteus1989/Air-Explorer-Decrypter.git</connection>
<developerConnection>scm:git:ssh://github.com/Proteus1989/Air-Explorer-Decrypter.git</developerConnection>
<url>https://github.com/Proteus1989/Air-Explorer-Decrypter</url>
<tag>HEAD</tag>
</scm>




</project>
Loading

0 comments on commit 0fdd310

Please sign in to comment.