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, 7provided only as an example. 8 9Usage: 10 grit.py -h grit.extern.BogoFP xmb /tmp/foo 11""" 12 13 14import grit.extern.FP 15 16 17def 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)) 23