N

รหัสตัวอย่าง

0
0

N

import hmac, pickle

# pickle the data
pickled = pickle.dumps(data)
digest =  hmac.new("some-shared-key", pickled, 
                   digestmod=<my choice of hasher>
                   ).hexdigest()

# now save the hashed digest and the pickled data
with open("some-file", "wb") as f:
    # save these in some way you can distinguish them when you read them
    print(digest, file=f)
    print(pickled, file=f)

ในภาษาอื่นๆ

หน้านี้อยู่ในภาษาอื่นๆ

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................