OLD | NEW |
| (Empty) |
1 #!/usr/bin/env python | |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
3 # Use of this source code is governed by a BSD-style license that can be | |
4 # found in the LICENSE file. | |
5 | |
6 """Bogus fingerprint implementation, do not use for production, | |
7 provided only as an example. | |
8 | |
9 Usage: | |
10 grit.py -h grit.extern.BogoFP xmb /tmp/foo | |
11 """ | |
12 | |
13 | |
14 import grit.extern.FP | |
15 | |
16 | |
17 def UnsignedFingerPrint(str, encoding='utf-8'): | |
18 """Generate a fingerprint not intended for production from str (it | |
19 reduces the precision of the production fingerprint by one bit). | |
20 """ | |
21 return (0xFFFFF7FFFFFFFFFF & | |
22 grit.extern.FP._UnsignedFingerPrintImpl(str, encoding)) | |
OLD | NEW |