Advertisement
Guest User

Untitled

a guest
Feb 4th, 2014
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.21 KB | None | 0 0
  1. std::string encode_key(std::string key) {
  2.     key += WSGUID;
  3.  
  4.     char hash[20] = {0};
  5.     char base64[128] = {0};
  6.  
  7.     sha1_hash(hash, key.c_str(), key.size());
  8.     base64_encode(base64, hash, 20);
  9.  
  10.     return base64;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement