Class CryptomanagerController
java.lang.Object
io.mosip.kernel.cryptomanager.controller.CryptomanagerController
Rest Controller for Crypto-Manager-Service
- Since:
- 1.0.0
- Author:
- Urvil Joshi, Srinivasan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.mosip.kernel.core.http.ResponseWrapper<CryptomanagerResponseDto> decrypt(@Valid io.mosip.kernel.core.http.RequestWrapper<CryptomanagerRequestDto> cryptomanagerRequestDto) Controller for Decrypt the dataio.mosip.kernel.core.http.ResponseWrapper<CryptoWithPinResponseDto> decryptWithPin(@Valid io.mosip.kernel.core.http.RequestWrapper<CryptoWithPinRequestDto> requestDto) Controller for Decrypt the data Using Pinio.mosip.kernel.core.http.ResponseWrapper<CryptomanagerResponseDto> encrypt(@Valid io.mosip.kernel.core.http.RequestWrapper<CryptomanagerRequestDto> cryptomanagerRequestDto) Controller for Encrypt the dataio.mosip.kernel.core.http.ResponseWrapper<CryptoWithPinResponseDto> encryptWithPin(@Valid io.mosip.kernel.core.http.RequestWrapper<CryptoWithPinRequestDto> requestDto) Controller for Encrypt the data Using Pinio.mosip.kernel.core.http.ResponseWrapper<Argon2GenerateHashResponseDto> generateArgon2Hash(@Valid io.mosip.kernel.core.http.RequestWrapper<Argon2GenerateHashRequestDto> argon2GenHashRequestDto) Controller to create Argon2 HASH for the input data.io.mosip.kernel.core.http.ResponseWrapper<JWTCipherResponseDto> jwtDecrypt(@Valid io.mosip.kernel.core.http.RequestWrapper<JWTDecryptRequestDto> jwtCipherRequestDto) Controller to Decrypt the data using JSON Web Encryptionio.mosip.kernel.core.http.ResponseWrapper<JWTCipherResponseDto> jwtEncrypt(@Valid io.mosip.kernel.core.http.RequestWrapper<JWTEncryptRequestDto> jwtCipherRequestDto) Controller to Encrypt the data using JSON Web Encryption
-
Constructor Details
-
CryptomanagerController
public CryptomanagerController()
-
-
Method Details
-
encrypt
@PreAuthorize("hasAnyRole(@cryptoManagerAuthRoles.getPostencrypt())") @ResponseFilter @PostMapping(value="/encrypt", produces="application/json") public io.mosip.kernel.core.http.ResponseWrapper<CryptomanagerResponseDto> encrypt(@RequestBody @Valid @Valid io.mosip.kernel.core.http.RequestWrapper<CryptomanagerRequestDto> cryptomanagerRequestDto) Controller for Encrypt the data- Parameters:
cryptomanagerRequestDto-CryptomanagerRequestDtorequest- Returns:
CryptomanagerResponseDtoencrypted Data
-
decrypt
@ResponseFilter @PreAuthorize("hasAnyRole(@cryptoManagerAuthRoles.getPostdecrypt())") @PostMapping(value="/decrypt", produces="application/json") public io.mosip.kernel.core.http.ResponseWrapper<CryptomanagerResponseDto> decrypt(@RequestBody @Valid @Valid io.mosip.kernel.core.http.RequestWrapper<CryptomanagerRequestDto> cryptomanagerRequestDto) Controller for Decrypt the data- Parameters:
cryptomanagerRequestDto-CryptomanagerRequestDtorequest- Returns:
CryptomanagerResponseDtodecrypted Data
-
encryptWithPin
@ResponseFilter @PreAuthorize("hasAnyRole(@cryptoManagerAuthRoles.getPostencryptwithpin())") @PostMapping(value="/encryptWithPin", produces="application/json") public io.mosip.kernel.core.http.ResponseWrapper<CryptoWithPinResponseDto> encryptWithPin(@RequestBody @Valid @Valid io.mosip.kernel.core.http.RequestWrapper<CryptoWithPinRequestDto> requestDto) Controller for Encrypt the data Using Pin- Parameters:
requestDto-CryptoWithPinRequestDtorequest- Returns:
CryptoWithPinResponseDtoencrypted Data
-
decryptWithPin
@ResponseFilter @PreAuthorize("hasAnyRole(@cryptoManagerAuthRoles.getPostdecryptwithpin())") @PostMapping(value="/decryptWithPin", produces="application/json") public io.mosip.kernel.core.http.ResponseWrapper<CryptoWithPinResponseDto> decryptWithPin(@RequestBody @Valid @Valid io.mosip.kernel.core.http.RequestWrapper<CryptoWithPinRequestDto> requestDto) Controller for Decrypt the data Using Pin- Parameters:
requestDto-CryptoWithPinRequestDtorequest- Returns:
CryptoWithPinResponseDtodecrypted Data
-
jwtEncrypt
@PreAuthorize("hasAnyRole(@cryptoManagerAuthRoles.getPostjwtencrypt())") @ResponseFilter @PostMapping(value="/jwtEncrypt", produces="application/json") public io.mosip.kernel.core.http.ResponseWrapper<JWTCipherResponseDto> jwtEncrypt(@RequestBody @Valid @Valid io.mosip.kernel.core.http.RequestWrapper<JWTEncryptRequestDto> jwtCipherRequestDto) Controller to Encrypt the data using JSON Web Encryption- Parameters:
jwtCipherRequestDto-JWTEncryptRequestDtorequest- Returns:
JWTCipherResponseDtoencrypted Data
-
jwtDecrypt
@ResponseFilter @PreAuthorize("hasAnyRole(@cryptoManagerAuthRoles.getPostjwtdecrypt())") @PostMapping(value="/jwtDecrypt", produces="application/json") public io.mosip.kernel.core.http.ResponseWrapper<JWTCipherResponseDto> jwtDecrypt(@RequestBody @Valid @Valid io.mosip.kernel.core.http.RequestWrapper<JWTDecryptRequestDto> jwtCipherRequestDto) Controller to Decrypt the data using JSON Web Encryption- Parameters:
jwtCipherRequestDto-JWTEncryptRequestDtorequest- Returns:
JWTCipherResponseDtodecrypted Data
-
generateArgon2Hash
@PreAuthorize("hasAnyRole(@cryptoManagerAuthRoles.getPostgenerateargon2hash())") @ResponseFilter @PostMapping(value="/generateArgon2Hash", produces="application/json") public io.mosip.kernel.core.http.ResponseWrapper<Argon2GenerateHashResponseDto> generateArgon2Hash(@RequestBody @Valid @Valid io.mosip.kernel.core.http.RequestWrapper<Argon2GenerateHashRequestDto> argon2GenHashRequestDto) Controller to create Argon2 HASH for the input data.- Parameters:
argon2GenHashRequestDto-Argon2GenerateHashRequestDtorequest- Returns:
Argon2GenerateHashResponseDtothe hash value and salt value
-