cisco / libsrtp

Library for SRTP (Secure Realtime Transport Protocol)
Other
1.21k stars 474 forks source link

Update README.md #489

Closed malwaremuser closed 4 years ago

malwaremuser commented 4 years ago

I cringed when I saw your UNIX command line in the function randhex() (line 390) -- just fixed it up.

Granted, it is now less efficient as a result of starting multiple commands in place of awk(1), but given you're reading from /dev/random I suspect your efficiency is shot anyway.

paulej commented 4 years ago

Why do you consider that better than awk? If it's the individual field names, we we do this:

function randhex() {
   cat /dev/random | od --read-bytes=32 --width=32 -x | awk '{ for (i = 2; i <= 16; i++) { printf "%s", $i } printf "\n" }'
}
malwaremuser commented 4 years ago

Yeah, that looks better -- it was more the long list of field names, which that for command fixes, and without starting multiple external commands. Sorry, daft idea -- scrap it.

paulej commented 4 years ago

How do you want to resolve this?

malwaremuser commented 4 years ago

Hi Paul -- apologies for the delay. I was just trawling through github looking for something and remembered this. Yeah, just kill it. I'll close it.