evp_bytestokey

WebJar for evp_bytestokey

Лицензия

Лицензия

MIT
Категории

Категории

KeY Данные Data Formats Formal Verification
Группа

Группа

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

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

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

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

1.0.3
Дата

Дата

Тип

Тип

jar
Описание

Описание

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

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

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

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

https://github.com/crypto-browserify/EVP_BytesToKey

Скачать evp_bytestokey

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

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

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.webjars.npm : md5.js jar [1.3.4,2)
org.webjars.npm : safe-buffer jar [5.1.1,6)

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

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

EVP_BytesToKey

NPM Package Build Status Dependency status

js-standard-style

The insecure key derivation algorithm from OpenSSL.

WARNING: DO NOT USE, except for compatibility reasons.

MD5 is insecure.

Use at least scrypt or pbkdf2-hmac-sha256 instead.

API

EVP_BytesToKey(password, salt, keyLen, ivLen)

  • password - Buffer, password used to derive the key data.
  • salt - 8 byte Buffer or null, salt is used as a salt in the derivation.
  • keyBits - number, key length in bits.
  • ivLen - number, iv length in bytes.

Returns: { key: Buffer, iv: Buffer }

Examples

MD5 with aes-256-cbc:

const crypto = require('crypto')
const EVP_BytesToKey = require('evp_bytestokey')

const result = EVP_BytesToKey(
  'my-secret-password',
  null,
  256,
  16
)
// =>
// { key: <Buffer a2 d9 67 9c 7f ff 3e 9c f4 30 0a 2c c3 fb ad 79 59 ed ae e8 a4 3c 1a 9d 71 68 ea c4 68 08 a5 7a>,
//  iv: <Buffer bf 5e 15 5a 28 94 3b 10 46 31 24 84 60 9c 5f 3c> }

const cipher = crypto.createCipheriv('aes-256-cbc', result.key, result.iv)

LICENSE MIT

org.webjars.npm

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

Версия
1.0.3
1.0.0