mirror of https://github.com/dswd/vpncloud.git
Compare commits
2 Commits
50058e60d0
...
70109eeb51
Author | SHA1 | Date |
---|---|---|
Dennis Schwerdel | 70109eeb51 | |
Dennis Schwerdel | 8fcd800d56 |
|
@ -1,4 +1,4 @@
|
|||
FROM debian:stable
|
||||
FROM ubuntu:16.04
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM centos:latest
|
||||
FROM centos:7
|
||||
|
||||
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 v = Vec::with_capacity(bytes.len() * 2);
|
||||
let mut s = String::with_capacity(bytes.len() * 2);
|
||||
for &byte in bytes {
|
||||
v.push(HEX_CHARS[(byte >> 4) as usize]);
|
||||
v.push(HEX_CHARS[(byte & 0xf) as usize]);
|
||||
s.push(HEX_CHARS[(byte >> 4) as usize] as char);
|
||||
s.push(HEX_CHARS[(byte & 0xf) as usize] as char);
|
||||
}
|
||||
unsafe { String::from_utf8_unchecked(v) }
|
||||
s
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue