Python/RubyでSHA-2
# coding=utf-8 import hashlib text = "任意の文字列" #print hashlib.sha224(text).hexdigest() print hashlib.sha256(text).hexdigest() print hashlib.sha384(text).hexdigest() print hashlib.sha512(text).hexdigest()
# -*- encoding: utf-8 -*- require "digest/sha2" text = "任意の文字列" puts Digest::SHA2.new(256).update(text) puts Digest::SHA2.new(384).update(text) puts Digest::SHA2.new(512).update(text)
結果
21c2cc67fb6ddc9c0cb4fd2d10f9488f521d54aabe62a5ceeff08bd6d92de38d c1a679b4931d7f1139ce73efcd1ab372d920efca698805c3f86db2f68b0fb525775d9006f146dcb3ea62cf04c7fdfda4 00f70a97f2fb2e38bb5efc000ee56709001c4b91c296ee6585081f91cfa709b0dad56595cc96671b66dcafe4478f56b1a108b88dd799e878016f76ddf6aa491d