Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
# com.github.ddth.commons.utils
## Included in `ddth-commons-core`
**Maven**
```xml
com.github.ddthddth-commons-core${ddth_commons_version}
```
### AESUtils
AES encryption utility class.
- Default: 128-bit encryption key
- Default: `AES/CTR/NoPadding` transformation
- Support custom transformation and IV
See [Java Cryptography Architecture Oracle Providers Documentation for JDK 8](https://docs.oracle.com/javase/8/docs/technotes/guides/security/SunProviders.html#cipherTable)
**New since v0.9.2**
- Support all AES cipher modes provided by [SunJCE Provider](https://docs.oracle.com/javase/8/docs/technotes/guides/security/SunProviders.html#cipherTable).
- Change `DEFAULT_CIPHER_TRANSFORMATION` to `AES/CTR/NoPadding`
- New methods:
- `String randomIV(int)` and `byte[] randomIVAsBytes(int)`
- `byte[] randomKeyAsBytesSecure()`, `byte[] randomIVAsBytesSecure()` and `byte[] randomIVAsBytesSecure(int)`
- `Cipher createCipher(int, byte[], byte[], String)`
- `encrypt(...)` and `decrypt(...)` that support encrypting/decrypting stream of large data.
- New classes `CipherException`, `DdthCipherInputStream` and `DdthCipherOutputStream`.
### DateFormatUtils
Utility to format a `java.util.Date` to string, and parse a string to `java.util.Date`.
- Use a pool of `java.text.DateFormat`s for multi-threading environment.
**New since v0.6.1**
- New constant `DF_ISO8601`: ISO8601 datetime format
### DateTimeUtils & CalendarWrapper
Helper class to work with `java.util.Date` and `java.util.Calendar`.
- Calculate the start-of-second/minute/hour/day/week/month/year point of a supplied `Calendar`.
**New since v0.9.2**
- New methods:
- `nextMillisecond(Calendar)` and `nextMillisecond(Date)`
- `addMilliseconds(...)`, `addSeconds(...)`, `addMinutes(...)`, `addHours(...)`, `addDays(...)`, `addWeeks(...)`, `addMonths(...)` and `addYears(...)`
### DPathUtils
Utility to access data from a hierarchy structure.
DPath notation:
- `.` (dot character): path separator.
- `name`: access a map's attribute specified by `name`.
- `[i]`: access i'th element of a list/map (0-based).
(example: `employees.[1].first_name`).
Sample usage: assuming you have the following data structure:
```java
Map company = new HashMap();
company.put("name", "Monster Corp.");
company.put("year", 2003);
List