- *canonical_name* must be a _HashId. - *builtin_object_type_fullname* is the fully-qualified name for the builtin HACL* type, e.g., "_md5.MD5Type". - *openssl_object_type_fullname* is the fully-qualified name for the OpenSSL wrapper type, e.g., "_hashl
(
self,
canonical_name,
builtin_object_type_fullname,
openssl_object_type_fullname,
builtin_method_fullname,
openssl_method_fullname=None,
hashlib_method_fullname=None,
)
| 307 | """ |
| 308 | |
| 309 | def __init__( |
| 310 | self, |
| 311 | canonical_name, |
| 312 | builtin_object_type_fullname, |
| 313 | openssl_object_type_fullname, |
| 314 | builtin_method_fullname, |
| 315 | openssl_method_fullname=None, |
| 316 | hashlib_method_fullname=None, |
| 317 | ): |
| 318 | """ |
| 319 | - *canonical_name* must be a _HashId. |
| 320 | |
| 321 | - *builtin_object_type_fullname* is the fully-qualified name |
| 322 | for the builtin HACL* type, e.g., "_md5.MD5Type". |
| 323 | |
| 324 | - *openssl_object_type_fullname* is the fully-qualified name |
| 325 | for the OpenSSL wrapper type, e.g., "_hashlib.HASH". |
| 326 | |
| 327 | - *builtin_method_fullname* is the fully-qualified name |
| 328 | of the HACL* hash constructor function, e.g., "_md5.md5". |
| 329 | |
| 330 | - *openssl_method_fullname* is the fully-qualified name |
| 331 | of the "_hashlib" module method for the explicit OpenSSL |
| 332 | hash constructor function, e.g., "_hashlib.openssl_md5". |
| 333 | |
| 334 | - *hashlib_method_fullname* is the fully-qualified name |
| 335 | of the "hashlib" module method for the explicit hash |
| 336 | constructor function, e.g., "hashlib.md5". |
| 337 | """ |
| 338 | assert isinstance(canonical_name, _HashId), canonical_name |
| 339 | self.canonical_name = canonical_name |
| 340 | self.type = _HashTypeInfo( |
| 341 | canonical_name, |
| 342 | builtin_object_type_fullname, |
| 343 | openssl_object_type_fullname, |
| 344 | ) |
| 345 | self.func = _HashFuncInfo( |
| 346 | canonical_name, |
| 347 | builtin_method_fullname, |
| 348 | openssl_method_fullname, |
| 349 | hashlib_method_fullname, |
| 350 | ) |
| 351 | |
| 352 | |
| 353 | _HASHINFO_DATABASE = frozendict({ |
no test coverage detected