]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
auth: Removed unused function generate_random_string.
authorTommi Virtanen <tommi.virtanen@dreamhost.com>
Wed, 2 Mar 2011 17:11:15 +0000 (09:11 -0800)
committerTommi Virtanen <tommi.virtanen@dreamhost.com>
Fri, 11 Mar 2011 21:13:18 +0000 (13:13 -0800)
It doesn't sound like a good idea in the first place, with
embedded zero bytes terminating the string prematurely.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
src/auth/Crypto.cc
src/auth/Crypto.h

index 1bca73d32e94406a9c516562ada8664f772c988b..7b2c3abcfa2bac710f7f34650f70c45a4334f00b 100644 (file)
@@ -48,14 +48,6 @@ static int get_random_bytes(int len, bufferlist& bl)
   return 0;
 }
 
-void generate_random_string(string& s, int len)
-{
-  char buf[len+1];
-  get_random_bytes(buf, len);
-  buf[len] = 0;
-  s = buf;
-}
-
 // ---------------------------------------------------
 
 class CryptoNone : public CryptoHandler {
index 782f3bb0a1c05c57e318a40feedecf078764dc83..565974be9e35174fc3e60a13704c8da2074ea252 100644 (file)
@@ -106,7 +106,6 @@ public:
 extern CryptoManager ceph_crypto_mgr;
 
 extern int get_random_bytes(char *buf, int len);
-extern void generate_random_string(string& s, int len);
 
 
 #endif