2 * Copyright (c) 2015, Facebook, Inc.
5 * This source code is licensed under the BSD-style license found in the
6 * LICENSE file in the "hack" directory of this source tree. An additional grant
7 * of patent rights can be found in the PATENTS file in the same directory.
11 let () = Random.self_init
()
14 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
17 assert (String.length
base64_alphabet = 64)
20 let r = ref (Random.bits
()) in
23 let c = base64_alphabet.[!r mod 64] in
24 cs := String.make
1 c :: !cs;