-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #208 from mahammedtaheer/dev-hash-gen
[ES-423] Added new API to generate Argon2 Hash.
- Loading branch information
Showing
13 changed files
with
288 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
...service/src/main/java/io/mosip/kernel/cryptomanager/dto/Argon2GenerateHashRequestDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* | ||
* | ||
* | ||
* | ||
*/ | ||
package io.mosip.kernel.cryptomanager.dto; | ||
|
||
import javax.validation.constraints.NotBlank; | ||
|
||
import io.mosip.kernel.cryptomanager.constant.CryptomanagerConstant; | ||
import io.swagger.annotations.ApiModel; | ||
import io.swagger.annotations.ApiModelProperty; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
/** | ||
* To generate Argon2 Hash Request model | ||
* | ||
* @author Mahammed Taheer | ||
* | ||
* @since 1.2.1 | ||
*/ | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@ApiModel(description = "Model representing a to generate Argon2 Hash Request") | ||
public class Argon2GenerateHashRequestDto { | ||
|
||
/** | ||
* Input data for hash generation | ||
*/ | ||
@ApiModelProperty(notes = "Input data for hash generation.", example = "SOME-BASE64-ENCODED-STRING", required = true) | ||
@NotBlank(message = CryptomanagerConstant.INVALID_REQUEST) | ||
private String inputData; | ||
|
||
/** | ||
* Salt to be included in the hash generation (Optional) | ||
*/ | ||
@ApiModelProperty(notes = "Salt value to be included in hash generation", example = "RANDOM-BYTES-DATA") | ||
private String salt; | ||
} |
39 changes: 39 additions & 0 deletions
39
...ervice/src/main/java/io/mosip/kernel/cryptomanager/dto/Argon2GenerateHashResponseDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* | ||
* | ||
* | ||
* | ||
*/ | ||
package io.mosip.kernel.cryptomanager.dto; | ||
|
||
import io.swagger.annotations.ApiModel; | ||
import io.swagger.annotations.ApiModelProperty; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
/** | ||
* To generate Argon2 Hash Response model | ||
* | ||
* @author Mahammed Taheer | ||
* | ||
* @since 1.2.1 | ||
*/ | ||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@ApiModel(description = "Model representing to generate Argon2 Hash Response") | ||
public class Argon2GenerateHashResponseDto { | ||
|
||
/** | ||
* Argon2 generated Hash value | ||
*/ | ||
@ApiModelProperty(notes = "generate Argon2 Hash") | ||
private String hashValue; | ||
|
||
/** | ||
* Salt value used in hash generation | ||
*/ | ||
@ApiModelProperty(notes = "Salt value used in Argon2 Hash") | ||
private String salt; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.