OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include <stdio.h> |
| 6 #include <string.h> |
| 7 |
| 8 #include "base/hash.h" |
| 9 #include "base/macros.h" |
| 10 |
| 11 int main(int argc, char **argv) { |
| 12 if (argc != 2) { |
| 13 fprintf(stderr, "Usage: %s <interface_name>", argv[0]); |
| 14 return 1; |
| 15 } |
| 16 uint32 data = base::Hash(argv[1], strlen(argv[1])); |
| 17 int hash = bit_cast<int>(data); |
| 18 printf("%s: %d\n", argv[1], hash); |
| 19 return 0; |
| 20 } |
OLD | NEW |