Skip to content

Commit 41bedac

Browse files
committed
Prepare version 1.3.0
1 parent ae0118d commit 41bedac

File tree

3 files changed

+29
-16
lines changed

3 files changed

+29
-16
lines changed

Examples/Android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ android {
1212
}
1313

1414
dependencies {
15-
compile 'com.github.simbiose:Encryption:v1.3.0'
15+
compile 'com.github.simbiose:Encryption:1.3.0'
1616
}

Examples/Java/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ sourceSets {
1919
}
2020

2121
dependencies {
22-
compile 'com.github.simbiose:Encryption:v1.3.0'
22+
compile 'com.github.simbiose:Encryption:1.3.0'
2323
}

README.md

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,35 @@
11
Encryption
22
=====================
33

4-
Encryption is a simple way to create encrypted strings to Android project.
4+
Encryption is a simple way to encrypt and decrypt strings on Android and Java project.
55

66
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-encryption-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/935)
77

8-
#Java Users#
9-
10-
I'm working at new version "1.3.0" and it will works both in Android and Java
11-
128
#How to use#
139

14-
1º Add the gradle dependency
10+
1º Add [JitPack](https://jitpack.io/) to your build file
11+
```
12+
allprojects {
13+
repositories {
14+
...
15+
maven { url "https://jitpack.io" }
16+
}
17+
}
18+
```
19+
20+
2º Add the gradle dependency
1521
```
16-
compile 'se.simbio.encryption:library:1.2.0'
22+
compile 'se.simbio.encryption:library:1.3.0'
1723
```
18-
2º a) Get an Encryption instance
24+
25+
3º Use Encryption
26+
27+
a) Get a default Encryption instance
1928
```
2029
Encryption encryption = Encryption.getDefault("YourKey", "YourSalt", yourByteIvArray);
2130
```
22-
2º b) Or build a new Encryption instance
31+
32+
b) Or build a custom Encryption instance
2333
```
2434
Encryption encryption = new Encryption.Builder()
2535
.setKeyLength(128)
@@ -35,25 +45,28 @@ Encryption encryption = new Encryption.Builder()
3545
.setSecretKeyType("PBKDF2WithHmacSHA1")
3646
.build();
3747
```
38-
3º Encrypt your text
48+
49+
4º Encrypt your text
3950
```
4051
String encrypted = encryption.encryptOrNull("Text to be encrypt");
4152
```
4253

43-
Decrypt your text
54+
Decrypt your text
4455
```
4556
String decrypted = encryption.decryptOrNull(encrypted);
4657
```
4758

59+
More examples see Examples folder, there is an Android and a Java project, or see the tests.
60+
4861
#FAQ#
4962

5063
- What is Encryption library?
51-
- Encryption library is an Open Source library to help encryption routines in Android applications, our target is to be simple and secure.
64+
- Encryption library is an Open Source library to help encryption routines in Android and Java applications, our target is to be simple and secure.
5265
- What is the "IV", what should be my `yourByteIvArray`
5366
- Encryption 1.2+ uses by default the AES algorithm in CBC mode, so to encrypt and decrypt works you should have the same key and the same IV byte array to encrypt and to decrypt. An example of IV is `byte[] iv = {-89, -19, 17, -83, 86, 106, -31, 30, -5, -111, 61, -75, -84, 95, 120, -53};` like you can see, 16 bytes in a byte array. So if you want to use this library I recommend you create you own IV and save it :floppy_disk:.
54-
- I Don't like null returns when errors occurs, what to do to handle errors?
67+
- I Don't like null returns when errors occurs, what to do to handle errors?
5568
- You have the power to handle the exceptions, instead of uses `encryptOrNull` method just uses the `encrypt` method. The same for the `decryptOrNull`, just uses the `decrypt` method.
56-
- I'm getting problems with main thread, what to do?
69+
- I'm getting problems with main thread, what to do?
5770
- Encrypt routines can take time, so you can uses the `encryptAsync` with a `Encryption.Callback`to avoid ANR'S. The same for `decryptAsync`
5871
- I'm an older user, version 1.1 or less, what to do to update Encrypt to version 1.2+?
5972
- The library has several changes in his structure in version 1.2, both in algorithm and in code usage, so if you are an older user you need migrate the encrypted stuff or configure the `Builder` manually to the same parameters used in version 1.1 and olds.

0 commit comments

Comments
 (0)