s1 compute key.

pull/556/head^2
winlin 9 years ago
parent cafe886c3f
commit 6191e0af90

@ -222,12 +222,28 @@ void show_macro_features()
#endif
}
#include <srs_rtmp_handshake.hpp>
/**
* main entrance.
*/
int main(int argc, char** argv)
{
int ret = ERROR_SUCCESS;
_srs_internal::SrsDH dh;
dh.initialize();
char key[128]; int nb_key = 128;
dh.copy_public_key(key, nb_key);
for (int i = 0; i < nb_key; i++) {
printf("%#x, ", (unsigned char)key[i]);
if (((i+1) %16) == 0) {
printf("\n");
}
}
printf("\n");
exit(0);
// TODO: support both little and big endian.
srs_assert(srs_is_little_endian());

@ -532,7 +532,7 @@ namespace _srs_internal
return ret;
}
// altough the public key is always 128bytes, but the share key maybe not.
// although the public key is always 128bytes, but the share key maybe not.
// we just ignore the actual key size, but if need to use the key, must use the actual size.
// TODO: FIXME: use the actual key size.
//srs_assert(pkey_size == 128);

Loading…
Cancel
Save