pub fn random_pk(mut seed: u8) -> bitcoin::PublicKey {
    loop {
        let mut data = [0; 33];
        for byte in &mut data[..] {
            *byte = seed;
            // totally a rng
            seed = seed.wrapping_mul(41).wrapping_add(53);
        }
        data[0] = 2 + (data[0] >> 7);
        if let Ok(key) = bitcoin::PublicKey::from_slice(&data[..33]) {
            return key;
        }
    }
}
/// Obtain an insecure random public key with unknown secret key for testing
Obtain an insecure random public key with unknown secret key for testing
Obtain an insecure random public key with unknown secret key for testing
pub fn random_pk(mut seed: u8) -> bitcoin::PublicKey {
    loop {
        let mut data = [0; 33];
        for byte in &mut data[..] {
            *byte = seed;
            // totally a rng
            seed = seed.wrapping_mul(41).wrapping_add(53);
        }
        data[0] = 2 + (data[0] >> 7);
        if let Ok(key) = bitcoin::PublicKey::from_slice(&data[..33]) {
            return key;
        }
    }
}
pub fn random_pk ( mut seed : u8 ) -> bitcoin :: PublicKey { loop { let mut data = [ 0 ; 33 ] ; for byte in & mut data [ .. ] { * byte = seed ; // totally a rng seed = seed . wrapping_mul ( 41 ) . wrapping_add ( 53 ) ; } data [ 0 ] = 2 + ( data [ 0 ] >> 7 ) ; if let Ok ( key ) = bitcoin :: PublicKey :: from_slice ( & data [ .. 33 ] ) { return key ; } } }
Obtain an insecure random public key with unknown secret key for testing
Obtain an insecure random public key with unknown secret key for testing
seed
u8
seed
u8