This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年09月27日 04:37 by Ye.Yuan, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (4) | |||
|---|---|---|---|
| msg171367 - (view) | Author: Ye Yuan (Ye.Yuan) | Date: 2012年09月27日 04:37 | |
Serialize/deserialize md5 context. Pseudocode:
import md5
# Start hash generation
m = md5.new()
m.update("Content")
# Serialize m
serialized_m = serialize(m)
# In another function/machine, deserialize m
# and continue hash generation
m2 = deserialize(serialized_m)
m2.update("More content")
m2.digest()
There are C++ lib but no Python one.
|
|||
| msg171374 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2012年09月27日 13:37 | |
In the python context I believe what you are asking for is to make hashlib hash objects pickleable. |
|||
| msg172267 - (view) | Author: Christian Heimes (christian.heimes) * (Python committer) | Date: 2012年10月06日 23:57 | |
I don't think it's possible to serialize an crypto hash object like MD5. The internal states of those objects are opaque data structures. There is no way official way to access the data structures in a platform independent way. It *might* be possible to hack something for our own implementation of md5 but definitely not for OpenSSL's implementation. |
|||
| msg172279 - (view) | Author: Gregory P. Smith (gregory.p.smith) * (Python committer) | Date: 2012年10月07日 02:50 | |
Unless someone supplies a patch that works inter-operably across all platforms using public APIs in openssl and with the internals of all of python's builtin non-openssl hash functions including unitests for all of the above... This isn't going to be implemented in the stdlib. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:36 | admin | set | github: 60263 |
| 2012年10月07日 02:50:37 | gregory.p.smith | set | status: open -> closed assignee: gregory.p.smith resolution: rejected messages: + msg172279 |
| 2012年10月06日 23:57:53 | christian.heimes | set | nosy:
+ gregory.p.smith, christian.heimes messages: + msg172267 |
| 2012年09月27日 13:37:55 | r.david.murray | set | nosy:
+ r.david.murray messages: + msg171374 versions: + Python 3.4, - Python 2.7 |
| 2012年09月27日 04:37:06 | Ye.Yuan | create | |