(n)
| 195 | |
| 196 | @staticmethod |
| 197 | def rand_keys(n): |
| 198 | ret = [] |
| 199 | idxes = set() |
| 200 | for _ in range(n): |
| 201 | while True: |
| 202 | i = random.randrange(len(KEYS)) |
| 203 | if not i in idxes: |
| 204 | break |
| 205 | idxes.add(i) |
| 206 | ret.append(KEYS[i]) |
| 207 | return ret |
| 208 | |
| 209 | @staticmethod |
| 210 | def make_desc(pattern, privmap, keys, pub_only = False): |