Returns a string with a part of the file path derived from the md5 hash. From https://github.com/CocoaPods/cdn.cocoapods.org: "There are a set of known prefixes for all Podspec paths, you take the name of the pod, create a hash (using md5) of it and take the first t
(name)
| 88 | |
| 89 | |
| 90 | def get_hashed_path(name): |
| 91 | """ |
| 92 | Returns a string with a part of the file path derived from the md5 hash. |
| 93 | |
| 94 | From https://github.com/CocoaPods/cdn.cocoapods.org: |
| 95 | "There are a set of known prefixes for all Podspec paths, you take the |
| 96 | name of the pod, create a hash (using md5) of it and take the first |
| 97 | three characters." |
| 98 | |
| 99 | """ |
| 100 | if not name: |
| 101 | return |
| 102 | podname = get_podname_proper(name) |
| 103 | if name != podname: |
| 104 | name_to_hash = podname |
| 105 | else: |
| 106 | name_to_hash = name |
| 107 | |
| 108 | hash_init = get_first_three_md5_hash_characters(name_to_hash) |
| 109 | hashed_path = '/'.join(list(hash_init)) |
| 110 | return hashed_path |
| 111 | |
| 112 | |
| 113 | # for FIPS support |
no test coverage detected