Documentation
    Preparing search index...

    Function EncryptedBody

    • Encrypted body decorator.

      EncryptedBody is a decorator function getting application/json typed data from request body which has been encrypted by AES-128/256 algorithm. Also, EncryptedBody validates the request body data type through typia ad the validation speed is maximum 15,000x times faster than class-validator.

      For reference, when the request body data is not following the promised type T, BadRequestException error (status code: 400) would be thrown. Also, EncryptedRoute decrypts request body using those options.

      • AES-128/256
      • CBC mode
      • PKCS #5 Padding
      • Base64 Encoding

      Type Parameters

      • T

      Parameters

      • Optionalvalidator: IRequestBodyValidator<T>

      Returns ParameterDecorator

      Parameter decorator

      Jeongho Nam - https://github.com/samchon