Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jacobbubu/pull-bitflipper
https://github.com/jacobbubu/pull-bitflipper
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jacobbubu/pull-bitflipper
- Owner: jacobbubu
- License: mit
- Created: 2020-04-09T16:00:16.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T03:03:21.000Z (about 2 years ago)
- Last Synced: 2024-11-13T16:12:05.833Z (2 months ago)
- Language: TypeScript
- Homepage:
- Size: 1.15 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# @jacobbubu/pull-bitflipper
[![Build Status](https://github.com/jacobbubu/pull-bitflipper/workflows/Build%20and%20Release/badge.svg)](https://github.com/jacobbubu/pull-bitflipper/actions?query=workflow%3A%22Build+and+Release%22)
[![Coverage Status](https://coveralls.io/repos/github/jacobbubu/pull-bitflipper/badge.svg)](https://coveralls.io/github/jacobbubu/pull-bitflipper)
[![npm](https://img.shields.io/npm/v/@jacobbubu/pull-bitflipper.svg)](https://www.npmjs.com/package/@jacobbubu/pull-bitflipper/)> Rewritten [pull-bitflipper](https://github.com/dominictarr/pull-bitflipper) in TypeScript.
# pull-bitflipper
pull stream that randomly flips bits in input stream,
useful for testing authenticated cryptography.## Example
``` js
import bitFlipper from '@jacobbubu/pull-bitflipper'pull(
// Create a source that calls a callback when it gets aborted.
source(function onAbort(err) {
// This should be called when the output fails because a bit was filpped.
}),createEncryptStream(),
// Pass in the probability that a particular message should
// Contain a flipped bit.
bitFlipper(prop = 0.1),createDecryptStream(),
sink(function (err) {
// The sink should error when the decryption stream
// finds a packet that does not authenticate.
})
)```