pub fn bitwise_and(val1: & Uint256, val2: & Uint256) -> Uint256 {
    let val1_bytes = val1.to_bytes_le();
    let val2_bytes = val2.to_bytes_le();

    let mut result_bytes: [u8; 32] = [0; 32]; 
    for i in 0..32 {
        let mut val1 = 0;
        let mut val2 = 0;
        if i < val1_bytes.len() { val1 = val1_bytes[i]; }
        if i < val2_bytes.len() { val2 = val2_bytes[i]; }
        result_bytes[i] = val1 & val2;
    }

    return Uint256::from_bytes_le(&result_bytes);
}
// Performs bitwise and between 2 vals
Performs bitwise and between 2 vals
Performs bitwise and between 2 vals
pub fn bitwise_and(val1: & Uint256, val2: & Uint256) -> Uint256 {
    let val1_bytes = val1.to_bytes_le();
    let val2_bytes = val2.to_bytes_le();
    let mut result_bytes: [u8; 32] = [0; 32]; 
    for i in 0..32 {
        let mut val1 = 0;
        let mut val2 = 0;
        if i < val1_bytes.len() { val1 = val1_bytes[i]; }
        if i < val2_bytes.len() { val2 = val2_bytes[i]; }
        result_bytes[i] = val1 & val2;
    }
    return Uint256::from_bytes_le(&result_bytes);
}
pub fn bitwise_and ( val1 : & Uint256 , val2 : & Uint256 ) -> Uint256 { let val1_bytes = val1 . to_bytes_le ( ) ; let val2_bytes = val2 . to_bytes_le ( ) ; let mut result_bytes : [ u8 ; 32 ] = [ 0 ; 32 ] ; for i in 0 .. 32 { let mut val1 = 0 ; let mut val2 = 0 ; if i < val1_bytes . len ( ) { val1 = val1_bytes [ i ] ; } if i < val2_bytes . len ( ) { val2 = val2_bytes [ i ] ; } result_bytes [ i ] = val1 & val2 ; } return Uint256 :: from_bytes_le ( & result_bytes ) ; }
Performs bitwise and between 2 vals
Performs bitwise and between 2 vals
val1
& Uint256
val2
& Uint256
val1
& Uint256
val2
& Uint256