/// Converts a sequence of bytes to trytes
Converts a sequence of bytes to trytes
Converts a sequence of bytes to trytes
pub fn bytes_to_trytes(input: &[u8]) -> String {
    let mut trytes = String::with_capacity(input.len() * 2);
    for byte in input {
        let first = byte % 27;
        let second = byte / 27;
        trytes.push(iota_constants::TRYTE_ALPHABET[first as usize]);
        trytes.push(iota_constants::TRYTE_ALPHABET[second as usize]);
    }
    trytes
}
pub fn bytes_to_trytes ( input : & [ u8 ] ) -> String { let mut trytes = String :: with_capacity ( input . len ( ) * 2 ) ; for byte in input { let first = byte % 27 ; let second = byte / 27 ; trytes . push ( iota_constants :: TRYTE_ALPHABET [ first as usize ] ) ; trytes . push ( iota_constants :: TRYTE_ALPHABET [ second as usize ] ) ; } trytes }
Converts a sequence of bytes to trytes
Converts a sequence of bytes to trytes
input
&[u8]