mirror of https://github.com/dswd/vpncloud.git
Compare commits
No commits in common. "70109eeb51d1ab51f352ae8836894add99e65ae8" and "50058e60d015a809ef954813a243f71336e29b57" have entirely different histories.
70109eeb51
...
50058e60d0
|
@ -1,4 +1,4 @@
|
|||
FROM ubuntu:16.04
|
||||
FROM debian:stable
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM centos:7
|
||||
FROM centos:latest
|
||||
|
||||
RUN yum groupinstall -y 'Development Tools'
|
||||
|
||||
|
|
|
@ -25,12 +25,12 @@ pub type Time = i64;
|
|||
const HEX_CHARS: &[u8] = b"0123456789abcdef";
|
||||
|
||||
pub fn bytes_to_hex(bytes: &[u8]) -> String {
|
||||
let mut s = String::with_capacity(bytes.len() * 2);
|
||||
let mut v = Vec::with_capacity(bytes.len() * 2);
|
||||
for &byte in bytes {
|
||||
s.push(HEX_CHARS[(byte >> 4) as usize] as char);
|
||||
s.push(HEX_CHARS[(byte & 0xf) as usize] as char);
|
||||
v.push(HEX_CHARS[(byte >> 4) as usize]);
|
||||
v.push(HEX_CHARS[(byte & 0xf) as usize]);
|
||||
}
|
||||
s
|
||||
unsafe { String::from_utf8_unchecked(v) }
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue