d8d711c31e2a42d0c43f6af1ce29584b1022a7ca
[platform/framework/web/crosswalk-tizen.git] /
1 var choice = require('./choice');
2
3     var _chars = '0123456789abcdef'.split('');
4
5     /**
6      * Returns a random hexadecimal string
7      */
8     function randHex(size){
9         size = size && size > 0? size : 6;
10         var str = '';
11         while (size--) {
12             str += choice(_chars);
13         }
14         return str;
15     }
16
17     module.exports = randHex;
18
19