These are chat archives for rust-lang/rust

12th
Aug 2016
Fletcher Haynes
@fhaynes
Aug 12 2016 04:29
Hello! Is there a way to split a String on just the first occurrence of a delimiter?
Fletcher Haynes
@fhaynes
Aug 12 2016 04:31
ahh, splitn is what I was looking for. Thank you, I somehow missed that in the docs
loggerhead
@loggerhead
Aug 12 2016 13:49
Hello. Is there anyone used rust-crypto to encrypt and decrypt stream data?
Seems SynchronousStreamCipher is what I want, but there is only a method named "process" to do encrypt and I can't find the method which do decrypt
Sergey Noskov
@Albibek
Aug 12 2016 14:06
@loggerhead , are you sure you're about correct semantics here? It seems to me that this trait is more about stream ciphers(https://en.wikipedia.org/wiki/Stream_cipher), but not about encrypting stream data
Anyways since stream ciphers are using xor, the decrypt operation is repeating of encrypt operation on encrypted data.
loggerhead
@loggerhead
Aug 12 2016 14:12
I have read the wiki, seems "SynchronousStreamCipher::process" is used to encrypt stream data. Otherwise, what's function it provide?
Oh, thank you very much! I have been stuck at finding a way to decrypt stream data because of my ignorant of the working principle.
Ironpillow
@ironpillow
Aug 12 2016 18:42
hi all, I am working on a concurrent ping program (send ping to multiple hosts at the same time). I got the basic - send/receive icmp packets for now. I am trying to make this async using mioco lib. But being new to concurrent programming, I am stuck. https://gist.github.com/ironpillow/d64f644fc42a05c2bcb5e4a3dff84815