feat: block2poly working

fix: for loops boundries
This commit is contained in:
0xalivecow 2024-10-18 22:44:46 +02:00
parent 64fe182fc3
commit ba3975e7fd
No known key found for this signature in database
3 changed files with 66 additions and 5 deletions

View file

@ -4,7 +4,7 @@ use base64::prelude::*;
pub fn get_alpha_rep(num: u128) -> String {
let mut powers: Vec<u32> = vec![];
for shift in 0..127 {
for shift in 0..128 {
//println!("{:?}", ((num >> shift) & 1));
if (((num >> shift) & 1) == 1) {
println!("Shift success");
@ -29,7 +29,7 @@ pub fn get_alpha_rep(num: u128) -> String {
pub fn get_bit_indices_from_byte(byte: u8) -> Vec<u8> {
let mut coefficients: Vec<u8> = vec![];
for shift in 0..7 {
for shift in 0..8 {
if ((byte >> shift) & 1) == 1 {
coefficients.push(shift);
}