wx-sdk 0.0.9

A Wechat SDK written in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use rand::{distributions::Alphanumeric, thread_rng, Rng};

pub(crate) mod base64;

pub(crate) fn get_random_string(size: usize) -> String {
    let rand_string: String = thread_rng()
        .sample_iter(&Alphanumeric)
        .take(size)
        .map(char::from)
        .collect();
    rand_string
}