docs: @SneakyThrows
      public static void generateQRCode(final OutputStream stream, final String key,
                                        final int width, final int height) {
          val hintMap = new EnumMap<EncodeHintType, Object>(EncodeHintType.class);
          hintMap.put(EncodeHintType.CHARACTER_SET, StandardCharsets.UTF_8.name());
          hintMap.put(EncodeHintType.MARGIN, 2);
          hintMap.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.L);
  
          val qrCodeWriter = new QRCodeWriter();
          val byteMatrix = qrCodeWriter.encode(key, BarcodeFormat.QR_CODE, width, height, hintMap);
          val byteMatrixWidth = byteMatrix.getWidth();
          val image = new BufferedImage(byteMatrixWidth, byteMatrixWidth, BufferedImage.TYPE_INT_RGB);
          image.createGraphics();
  
          @Cleanup("dispose")
          val graphics = (Graphics2D) image.getGraphics();
  
          graphics.setColor(Color.WHITE);
          graphics.fillRect(0, 0, byteMatrixWidth, byteMatrixWidth);
          graphics.setColor(Color.BLACK);
  
          IntStream.range(0, byteMatrixWidth)
              .forEach(i -> IntStream.range(0, byteMatrixWidth)
                  .filter(j -> byteMatrix.get(i, j))
                  .forEach(j -> graphics.fillRect(i, j, 1, 1)));
  
          ImageIO.write(image, "png", stream);
      }