mirror of
https://github.com/fluencelabs/js-libp2p-crypto
synced 2025-03-15 15:10:59 +00:00
chore: update badges for consistency across libp2p org
This commit is contained in:
parent
e3f02eb6f1
commit
c1f867bd9c
11
README.md
11
README.md
@ -1,9 +1,8 @@
|
|||||||
# js-libp2p-crypto
|
# js-libp2p-crypto
|
||||||
|
|
||||||
[](http://ipn.io)
|
[](http://protocol.ai)
|
||||||
[](http://ipfs.io/)
|
[](http://libp2p.io/)
|
||||||
[](http://webchat.freenode.net/?channels=%23ipfs)
|
[](http://webchat.freenode.net/?channels=%23libp2p)
|
||||||
[](https://github.com/RichardLitt/standard-readme)
|
|
||||||
[](https://coveralls.io/github/libp2p/js-libp2p-crypto?branch=master)
|
[](https://coveralls.io/github/libp2p/js-libp2p-crypto?branch=master)
|
||||||
[](https://travis-ci.org/libp2p/js-libp2p-crypto)
|
[](https://travis-ci.org/libp2p/js-libp2p-crypto)
|
||||||
[](https://circleci.com/gh/libp2p/js-libp2p-crypto)
|
[](https://circleci.com/gh/libp2p/js-libp2p-crypto)
|
||||||
@ -62,7 +61,7 @@ This uses `CTR` mode.
|
|||||||
|
|
||||||
- `key: Buffer` The key, if length `16` then `AES 128` is used. For length `32`, `AES 256` is used.
|
- `key: Buffer` The key, if length `16` then `AES 128` is used. For length `32`, `AES 256` is used.
|
||||||
- `iv: Buffer` Must have length `16`.
|
- `iv: Buffer` Must have length `16`.
|
||||||
- `callback: Function`
|
- `callback: Function`
|
||||||
|
|
||||||
##### `decrypt(data, callback)`
|
##### `decrypt(data, callback)`
|
||||||
|
|
||||||
@ -109,7 +108,7 @@ async function main () {
|
|||||||
if (!err) {
|
if (!err) {
|
||||||
console.log(decryptedBuffer)
|
console.log(decryptedBuffer)
|
||||||
// prints: <Buffer 42 f1 67 d9 2e 42 d0 32 9e b1 f8 3c>
|
// prints: <Buffer 42 f1 67 d9 2e 42 d0 32 9e b1 f8 3c>
|
||||||
|
|
||||||
console.log(decryptedBuffer.toString('utf-8'))
|
console.log(decryptedBuffer.toString('utf-8'))
|
||||||
// prints: Hello, world!
|
// prints: Hello, world!
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user