{"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fy0m0r.hateblo.jp%2Fentry%2F20130616%2F1371383054\" title=\"PBKDF2 - \u30e1\u30e2\u7f6e\u304d\u5834\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","image_url":null,"categories":["python","django"],"blog_url":"https://y0m0r.hateblo.jp/","blog_title":"\u30e1\u30e2\u7f6e\u304d\u5834","type":"rich","provider_name":"Hatena Blog","url":"https://y0m0r.hateblo.jp/entry/20130616/1371383054","author_url":"https://blog.hatena.ne.jp/yuheiomori0718/","published":"2013-06-16 20:44:14","title":"PBKDF2","provider_url":"https://hatena.blog","author_name":"yuheiomori0718","description":"Django\u3067\u306f\u30e6\u30fc\u30b6\u30fc\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u30cf\u30c3\u30b7\u30e5\u3067db\u306b\u4fdd\u5b58\u3057\u307e\u3059\u3002django1.3\u3067\u306f\u5358\u7d14\u306bsalt+sha1\u3067\u3057\u305f\u3002 def set_password(self, raw_password): if raw_password is None: self.set_unusable_password() else: import random algo = 'sha1' salt = get_hexdigest(algo, str(random.random()), str(random.random()))[:5] hsh = get_hexdigest(algo, salt, raw_pa\u2026","width":"100%","height":"190","version":"1.0"}