SHARE
TWEET

Untitled

a guest Oct 21st, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. use data_encoding::{Encoding, BASE32_NOPAD};
  2.  
  3. fn main() {
  4.     let mut spec = BASE32_NOPAD.specification();
  5.     spec.check_trailing_bits = false;
  6.     let base = spec.encoding().unwrap();
  7.     for i in 0..10 {
  8.         println!("{:?}", generate(&base, i));
  9.     }
  10. }
  11.  
  12. fn generate(base: &Encoding, len: usize) -> Vec<u8> {
  13.     let input = vec![b'F'; base.encode_len(len)]; // Randomize content.
  14.     base.decode(&input).unwrap()
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top