SecureApi DocumentSecureApi Document
Home
Get Start
Version History
  • China Mainland
  • International
  • 简体中文
  • English
Home
Get Start
Version History
  • China Mainland
  • International
  • 简体中文
  • English
  • Start
  • Guide

    • Install
    • Configuration
    • Try It
    • Annotation
    • Url Pattern
    • Exception Handle
    • Encryption Algorithm
    • CipherUtils
    • Two Modes
    • DH Key Agreement
    • Digital Signature Verification
  • Js Demo
  • Best Practice
  • Microservice Invocation
  • Black King Kong

Annotation

The component has a total of 3 annotations: @EncryptApi @DecryptApi @DecryptParam,If URL matching is configured, then the matching interface can be encrypted and decrypted without using the following annotations.

WARNING

Please be very careful!!!, Do not use @RequestParam for parameters that need to be decrypted, which will cause the decryption function to fail (even if the URL match is configured). @DecryptParam provides the same capabilities as @RequestParam, just use @DecryptParam.

The "interfaces" mentioned below are all methods marked by @RestController, not interface methods. Please make it clear to avoid ambiguity.

@EncryptApi

Annotations functionUse positionFieldNotes
Encryption interface return valueThe interface or the class where the interface is locatedNot haveThe priority is higher than the url match. Even if the interface does not match, adding this annotation will encrypt the return value.

@DecryptApi

Annotations functionUse positionFieldNotes
Decrypt the interface json parameter value (that is, the parameter marked with @RequestBody)The interface or the class where the interface is locatedNot haveThe priority is higher than the url match. Even if the interface is not matched, adding this annotation will decrypt the parameters.

@DecryptParam

WARNING

Remind again!!! Please be very careful!!!, Do not use @RequestParam for parameters that need to be decrypted, which will cause the decryption function to fail (even if the URL match is configured). @DecryptParam provides the same capabilities as @RequestParam, just use @DecryptParam.

WARNING

MultipartFile decryption is not supported for the time being, and will be developed in the future.

Annotations functionUse positionFieldNotes
Decrypt interface param and form-data parameter valuesInterface non-entity class parameter or interface entity class parameter fieldSame as @RequestParamThe priority is higher than the URL match, even if the interface does not match, adding this annotation will decrypt the parameters; in addition, this annotation cannot be used with @RequestParam at the same time, which will cause the decryption function to fail. This annotation has replaced the @RequestParam function, and the internal field function is the same as @RequestParam

@DecryptIgnore

Annotations functionUse positionFieldNotes
Ignore decryptionClass, method, parameter, fieldNoNo

@EncryptIgnore

Annotations functionUse positionFieldNotes
Ignore encryptionClass, method, parameter, fieldNoNo
Edit on GitHub
Last Updated:
Contributors: XuYijie
Prev
Try It
Next
Url Pattern