mirror of
https://github.com/fluencelabs/js-libp2p-crypto
synced 2025-03-15 10:41:03 +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
|
||||
|
||||
[](http://ipn.io)
|
||||
[](http://ipfs.io/)
|
||||
[](http://webchat.freenode.net/?channels=%23ipfs)
|
||||
[](https://github.com/RichardLitt/standard-readme)
|
||||
[](http://protocol.ai)
|
||||
[](http://libp2p.io/)
|
||||
[](http://webchat.freenode.net/?channels=%23libp2p)
|
||||
[](https://coveralls.io/github/libp2p/js-libp2p-crypto?branch=master)
|
||||
[](https://travis-ci.org/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.
|
||||
- `iv: Buffer` Must have length `16`.
|
||||
- `callback: Function`
|
||||
- `callback: Function`
|
||||
|
||||
##### `decrypt(data, callback)`
|
||||
|
||||
@ -109,7 +108,7 @@ async function main () {
|
||||
if (!err) {
|
||||
console.log(decryptedBuffer)
|
||||
// prints: <Buffer 42 f1 67 d9 2e 42 d0 32 9e b1 f8 3c>
|
||||
|
||||
|
||||
console.log(decryptedBuffer.toString('utf-8'))
|
||||
// prints: Hello, world!
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user