sha

WebJar for sha

Лицензия

Лицензия

BSD 2-Clause
MIT
Группа

Группа

org.webjars.npm
Идентификатор

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

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

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

3.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

sha
WebJar for sha
Ссылка на сайт

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

http://webjars.org
Система контроля версий

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

https://github.com/ForbesLindesay/sha

Скачать sha

Имя Файла Размер
sha-3.0.0.pom
sha-3.0.0.jar 5 KB
sha-3.0.0-sources.jar 22 bytes
sha-3.0.0-javadoc.jar 22 bytes
Обзор

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

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

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.webjars.npm : graceful-fs jar [4.1.2,5)

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

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

sha

Check and get file hashes (using any algorithm)

Build Status Dependency Status NPM version

Installation

$ npm install sha

API

check(fileName, expected, [options,] cb) / checkSync(filename, expected, [options])

Asynchronously check that fileName has a "hash" of expected. The callback will be called with either null or an error (indicating that they did not match).

Options:

  • algorithm: defaults to sha1 and can be any of the algorithms supported by crypto.createHash

get(fileName, [options,] cb) / getSync(filename, [options])

Asynchronously get the "hash" of fileName. The callback will be called with an optional error object and the (lower cased) hex digest of the hash.

Options:

  • algorithm: defaults to sha1 and can be any of the algorithms supported by crypto.createHash

stream(expected, [options])

Check the hash of a stream without ever buffering it. This is a pass through stream so you can do things like:

fs.createReadStream('src')
  .pipe(sha.stream('expected'))
  .pipe(fs.createWriteStream('dest'))

dest will be a complete copy of src and an error will be emitted if the hash did not match 'expected'.

Options:

  • algorithm: defaults to sha1 and can be any of the algorithms supported by crypto.createHash

License

You may use this software under the BSD or MIT. Take your pick. If you want me to release it under another license, open a pull request.

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

Версия
3.0.0
2.0.1