# bitflip-rs This crate provides functions to generate bitflips of binary and UTF-8 strings. This is useful to catch potential instances of [bitsquatting][bitsquatting], where [an attacker may register a crate/domain name/whatever at a bitflipped version of their target][bitflip-attack]. This crate is essentially a port of the [Python `blip` package][blip] created by [Zack Allen][zmallen]. ## Usage A very simple example would be: ```rust for s in bitflip::ascii_str("ab") { print!("{s} "); } ``` Which outputs: ``` `b cb eb ib qb Ab !b ac a` af aj ar aB a" ``` See [the API documentation][api-docs] for more information on what's available. ## [Code of Conduct][code-of-conduct] The Rust Foundation has adopted a Code of Conduct that we expect project participants to adhere to. Please read [the full text][code-of-conduct] so that you can understand what actions will and will not be tolerated. ## Contributing See [CONTRIBUTING.md](CONTRIBUTING.md). ## Licenses Rust is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with documentation portions covered by the Creative Commons Attribution 4.0 International license.. See [LICENSE-APACHE](LICENSE-APACHE), [LICENSE-MIT](LICENSE-MIT), [LICENSE-documentation](LICENSE-documentation), and [COPYRIGHT](COPYRIGHT) for details. You can also read more under the Foundation's [intellectual property policy][ip-policy]. ## Trademark [The Rust Foundation][rust-foundation] owns and protects the Rust and Cargo trademarks and logos (the "Rust Trademarks"). If you want to use these names or brands, please read the [media guide][media-guide]. ## Other Policies You can read about other Rust Fondation policies in the footer of the Foundation [website][foundation-website]. [rust-foundation]: https://foundation.rust-lang.org/ [media-guide]: https://foundation.rust-lang.org/policies/logo-policy-and-media-guide/ [ip-policy]: https://foundation.rust-lang.org/policies/intellectual-property-policy/ [foundation-website]: https://foundation.rust-lang.org [code-of-conduct]: https://foundation.rust-lang.org/policies/code-of-conduct/ [api-docs]: https://docs.rs/bitflip [bitsquatting]: https://en.wikipedia.org/wiki/Bitsquatting [bitflip-attack]: https://en.wikipedia.org/wiki/Bit-flipping_attack [blip]: https://pypi.org/project/blip/ [zmallen]: https://github.com/zmallen