Class ZKCryptoManagerController
java.lang.Object
io.mosip.kernel.zkcryptoservice.controller.ZKCryptoManagerController
Rest Controller for Zero Knowledge Crypto-Manager-Service
- Since:
- 1.1.2
- Author:
- Mahammed Taheer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.mosip.kernel.core.http.ResponseWrapper<ZKCryptoResponseDto> zkDecrypt(@Valid io.mosip.kernel.core.http.RequestWrapper<ZKCryptoRequestDto> zkCryptoRequestDto) Controller for Decrypt the dataio.mosip.kernel.core.http.ResponseWrapper<ZKCryptoResponseDto> zkEncrypt(@Valid io.mosip.kernel.core.http.RequestWrapper<ZKCryptoRequestDto> zkCryptoRequestDto) Controller for Encrypt the dataio.mosip.kernel.core.http.ResponseWrapper<ReEncryptRandomKeyResponseDto> zkReEncryptRandomKey(String encryptedKey) Controller for Decrypt the data
-
Constructor Details
-
ZKCryptoManagerController
public ZKCryptoManagerController()
-
-
Method Details
-
zkEncrypt
@PreAuthorize("hasAnyRole(@zkAuthRoles.getPostzkencrypt())") @ResponseFilter @PostMapping(value="/zkEncrypt", produces="application/json") public io.mosip.kernel.core.http.ResponseWrapper<ZKCryptoResponseDto> zkEncrypt(@RequestBody @Valid @Valid io.mosip.kernel.core.http.RequestWrapper<ZKCryptoRequestDto> zkCryptoRequestDto) Controller for Encrypt the data- Parameters:
zkCryptoRequestDto-ZKCryptoRequestDtorequest- Returns:
ZKCryptoResponseDtoencrypted Data
-
zkDecrypt
@PreAuthorize("hasAnyRole(@zkAuthRoles.getPostzkdecrypt())") @ResponseFilter @PostMapping(value="/zkDecrypt", produces="application/json") public io.mosip.kernel.core.http.ResponseWrapper<ZKCryptoResponseDto> zkDecrypt(@RequestBody @Valid @Valid io.mosip.kernel.core.http.RequestWrapper<ZKCryptoRequestDto> zkCryptoRequestDto) Controller for Decrypt the data- Parameters:
zkCryptoRequestDto-ZKCryptoRequestDtorequest- Returns:
ZKCryptoResponseDtodecrypted Data
-
zkReEncryptRandomKey
@PreAuthorize("hasAnyRole(@zkAuthRoles.getPostzkreencryptrandomkey())") @ResponseFilter @PostMapping(value="/zkReEncryptRandomKey", produces="application/json") public io.mosip.kernel.core.http.ResponseWrapper<ReEncryptRandomKeyResponseDto> zkReEncryptRandomKey(@RequestParam("encryptedKey") String encryptedKey) Controller for Decrypt the data- Parameters:
cryptomanagerRequestDto-CryptomanagerRequestDtorequest- Returns:
CryptomanagerResponseDtodecrypted Data
-