This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub fn hex2b64(s: &str) -> String { | |
assert_eq!(s.len() % 2, 0); | |
let bit_mask1 = 0x00FC_0000; | |
let bit_mask2 = 0x0003_F000; | |
let bit_mask3 = 0x0000_0FC0; | |
let bit_mask4 = 0x0000_003F; | |
let excess_bytes = s.len() / 2 % 3; | |
let mut buf = String::new(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
list(map(print, map(lambda n : (chr(0x0).join(chr(x) for x in (int(n[3 * i:3 * i + 3]) for i in range(0, len(n) // 3)))), [ "104101108108111", "119111114108100" ]))) |
OlderNewer