{"published":"2008-11-04 00:00:02","image_url":null,"blog_url":"https://so-wh.at/","title":" OpenSSL: AEC-CBC\u306e\u521d\u671f\u30d9\u30af\u30c8\u30eb \u305d\u306e\uff12","description":"pkcs5_keyivgen\u3067\u9069\u5207\u306bsalt\u3092\u8a2d\u5b9a\u3059\u308c\u3070\u3044\u3044\u306e\u304b\u3082\u3002 \u8a66\u3057\u3066\u307f\u308b\u3002 require 'openssl' passwd = 'foobarzoo' source = '\u3058\u3085\u3052\u3080\u3058\u3085\u3052\u3080' def encrypt(plain, passwd, salt = nil) cipher = OpenSSL::Cipher::Cipher.new('AES-256-CBC') cipher.encrypt cipher.pkcs5_keyivgen(passwd, salt) crypted = (cipher.update(plain) + cipher.final) crypted.u\u2026","version":"1.0","type":"rich","author_name":"winebarrel","width":"100%","provider_name":"Hatena Blog","author_url":"https://blog.hatena.ne.jp/winebarrel/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fso-wh.at%2Fentry%2F20081104%2Fp6\" title=\" OpenSSL: AEC-CBC\u306e\u521d\u671f\u30d9\u30af\u30c8\u30eb \u305d\u306e\uff12 - so what\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","categories":["RUBY"],"provider_url":"https://hatena.blog","blog_title":"so what","height":"190","url":"https://so-wh.at/entry/20081104/p6"}