crypto-lib/src/main/java/com/streamsets/pipeline/stage/processor/crypto/FieldEncrypter.java
public Optional<Field> checkInputDecrypt(Field field) throws StageException {
    if (field.getType() != Field.Type.BYTE_ARRAY) {
      throw new StageException(CRYPTO_02, field.getType());
    }
    return Optional.of(field);
  }
public Optional<Field> checkInputDecrypt(Field field) throws StageException {
    if (field.getType() != Field.Type.BYTE_ARRAY) {
      throw new StageException(CRYPTO_02, field.getType());
    }
    return Optional.of(field);
  }
public Optional < Field > checkInputDecrypt ( Field field ) throws StageException { if ( field . getType ( ) != Field . Type . BYTE_ARRAY ) { throw new StageException ( CRYPTO_02 , field . getType ( ) ) ; } return Optional . of ( field ) ; }
Checks that the decryption input is a valid type, otherwise sends the
record to StageException.

@param field {@link Field}
@return empty {@link Optional} if the record was sent to error
Checks that the decryption input is a valid type otherwise sends the record to StageException .