NanoCaptcha

A Java-based CAPTCHA implementation with a minimum of dependencies.

Лицензия

Лицензия

Категории

Категории

Сеть
Группа

Группа

net.logicsquad
Идентификатор

Идентификатор

nanocaptcha
Последняя версия

Последняя версия

1.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

NanoCaptcha
A Java-based CAPTCHA implementation with a minimum of dependencies.
Ссылка на сайт

Ссылка на сайт

https://github.com/logicsquad/nanocaptcha
Организация-разработчик

Организация-разработчик

Logic Squad
Система контроля версий

Система контроля версий

https://github.com/logicsquad/nanocaptcha/tree/master

Скачать nanocaptcha

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/net.logicsquad/nanocaptcha/ -->
<dependency>
    <groupId>net.logicsquad</groupId>
    <artifactId>nanocaptcha</artifactId>
    <version>1.2</version>
</dependency>
// https://jarcasting.com/artifacts/net.logicsquad/nanocaptcha/
implementation 'net.logicsquad:nanocaptcha:1.2'
// https://jarcasting.com/artifacts/net.logicsquad/nanocaptcha/
implementation ("net.logicsquad:nanocaptcha:1.2")
'net.logicsquad:nanocaptcha:jar:1.2'
<dependency org="net.logicsquad" name="nanocaptcha" rev="1.2">
  <artifact name="nanocaptcha" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.logicsquad', module='nanocaptcha', version='1.2')
)
libraryDependencies += "net.logicsquad" % "nanocaptcha" % "1.2"
[net.logicsquad/nanocaptcha "1.2"]

Зависимости

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.13.1

Модули Проекта

Данный проект не имеет модулей.

License

NanoCaptcha

What is this?

NanoCaptcha is a Java library for generating image and audio CAPTCHAs. NanoCaptcha is intended to be:

  • Self-contained: no network API hits to any external services.

  • Minimally-dependent: using NanoCaptcha should not involve pulling in a plethora of JARs, and ideally none at all.

Getting started

You can build a minimal image CAPTCHA very easily:

ImageCaptcha imageCaptcha = new ImageCaptcha.Builder(200, 50).addContent().build();

This creates a 200 x 50 pixel image and adds five random characters from the Latin alphabet. The getImage() method returns the image as a BufferedImage object. isCorrect(String) will verify the supplied string against the text content of the image. If you need the text content itself, call getContent(). Image CAPTCHAs can be further customised by:

  • Using different ContentProducers (e.g., ChineseContentProducer).
  • Adding noise using a NoiseProducer.
  • Adding various ImageFilters.
  • Adding a background or a border.

Building a minimal audio CAPTCHA is just as easy:

AudioCaptcha audioCaptcha = new AudioCaptcha.Builder().addContent().build();

As with image CAPTCHAs, these can be further customised by:

  • Adding background noise with a NoiseProducer.

Using NanoCaptcha

You can use NanoCaptcha in your projects by including it as a Maven dependency:

<dependency>
  <groupId>net.logicsquad</groupId>
  <artifactId>nanocaptcha</artifactId>
  <version>1.2</version>
</dependency>

Roadmap

The following are some potential ideas for future releases:

  1. Further reduce the public API surface where possible. A first pass over the SimpleCaptcha code made a few reductions, but there might be scope for more.

Contributing

By all means, open issue tickets and pull requests if you have something to contribute.

References

NanoCaptcha is based on SimpleCaptcha, and incorporates code from JH Labs Java Image Filters.

net.logicsquad

Logic Squad

We specialise in designing and building bespoke applications for the web and mobile (iOS & Android), for small to medium businesses.

Версии библиотеки

Версия
1.2
1.1
1.0