Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cns-dgsw/reflectivecipher
A Reflection Cryption Library fork with additional features and fixes
https://github.com/cns-dgsw/reflectivecipher
aop-aspectj decryptor encryptor java spring-boot-starter
Last synced: about 1 month ago
JSON representation
A Reflection Cryption Library fork with additional features and fixes
- Host: GitHub
- URL: https://github.com/cns-dgsw/reflectivecipher
- Owner: CNS-DGSW
- License: mit
- Created: 2023-03-11T16:13:38.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-14T06:02:49.000Z (almost 2 years ago)
- Last Synced: 2024-04-18T06:17:24.589Z (9 months ago)
- Topics: aop-aspectj, decryptor, encryptor, java, spring-boot-starter
- Language: Java
- Homepage:
- Size: 34.2 KB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
# ReflectiveCipher
> ReflectiveCipher is a Reflection Encrypt Library forked base on
> [Reflcypt](https://github.com/CNS-DGSW/Reflcrypt).
The main focus of this project is adding new features and patches
> while also keeping up to date with the original project
> library's default key-algorithm is `PBKDF2WithHmacSHA256`## How To Use
### Simple implementation
In your security field, add the code below
```java
public class Secret {
@SecurityField // encrypt and decrypt this field.
private String field;
@EncryptParams // encrypt 'topSecret' parameter
public void vulnerableMethod(@SecurityParam String topSecret) {
// ...
}
@DecryptReturns // decrypt and return 'NonSecret' object
public NonSecret info() {
// ...
}
}
```## Properties
### [for field] `@SecurityField`
> Assign field to encrypt or decrypt
* support types:
* String
* byte[] or Byte[]### [for Param] `@SecurityParam`
> Assign parameter to encrypt or decrypt
* support types:
* String
* byte[] or Byte[]### [for Method] `@EncryptParams`
> Encrypt argument, encrypt all field in argument
* useful in JPA Repository.
* ex) `.save()`
* when entity save, will encrypt### [for Method] `@DecryptParams`
> Decrypt argument, decrypt all field in argument### [for Method] `@EncryptReturns`
> Encrypt return object### [for Method] `@DecryptReturns`
> Decrypt return object
* useful in JPA Repository
* when method call from JPA Repository, decrypt entity and return## Springboot Application properties
Springboot properties prefix is `cipher`
### `algorithm`
> Set cipher-algorithm such as **'AES/CBC/PKCS5Padding'**
* Must be choose in [Java Security Standard Algorithm Name](https://docs.oracle.com/javase/9/docs/specs/security/standard-names.html#security-algorithm-implementation-requirements)
* The class is Cipher### `key`
> Set secret-key### `hash`
> Set hash value### `iv`
> Set Initialization Vector value
* Length is must be 16 bytes long## Collaboration
It adheres to Java's standard conventions, it's flexible enough for many variations,
and I'm sure you can improve and add more features to the API in an easy-to-use way,
so feel free to post ideas, issues, and pull requests.## Licence
ReflectiveCipher is available under the MIT License.## π§βπ» Thanks to the original developer
* **[μ΄μΉλ―Ό (Eric Lee)](https://github.com/ericlee05)** - CNS 3κΈ° λ°±μλν