るりまサーチ

最速Rubyリファレンスマニュアル検索!
156件ヒット [101-156件を表示] (0.056秒)
トップページ > クエリ:openssl[x] > クエリ:to_text[x]

別のキーワード

  1. _builtin to_s
  2. openssl to_der
  3. openssl to_s
  4. _builtin to_a
  5. openssl to_pem

検索結果

<< < 1 2 >>

OpenSSL::PKey::DSA#to_text -> String (29101.0)

鍵を人間が読める形式に変換します。

鍵を人間が読める形式に変換します。

OpenSSL::PKey::RSA#to_text -> String (29101.0)

鍵を人間が読める形式に変換します。

鍵を人間が読める形式に変換します。

OpenSSL::X509::Certificate#to_text -> String (29101.0)

人間が読める形式の文字列を返します。

人間が読める形式の文字列を返します。

OpenSSL::PKey::RSA (11078.0)

RSA 暗号鍵のクラスです。

...通常このクラスで利用するのは、
OpenSSL
::PKey::RSA.generate, OpenSSL::PKey::RSA.new,
OpenSSL
::PKey::RSA#public?, OpenSSL::PKey::RSA#private?,
OpenSSL
::PKey::RSA#public_key, OpenSSL::PKey::RSA#to_text,
OpenSSL
::PKey::RSA#to_pem, OpenSSL::PKey::RSA#to_der
のいずれかでしょう。...
...ついてよく理解し、必要な場合のみにすべきです。


例:
require 'openssl'

# initialize random seed
OpenSSL
::Random.seed(File.read("/dev/random", 16))
# 鍵対を生成
rsa = OpenSSL::PKey::RSA.generate(2048)
# 秘密鍵をAES256で暗号化して private_key.pem に...
...PEM 形式で保存
passphrase = "!secret passphrase!"
File.open("private_key.pem", "w") do |f|
f.write(rsa.export(OpenSSL::Cipher.new("aes256"), passphrase))
end
# 公開鍵をpublic_key.pemに保存
public_key = rsa.public_key
File.open("public_key.pem", "w") do |f|
f.write(pu...

OpenSSL::SSL::SSLSocket (11024.0)

ソケットをラップして SSL での認証と暗号通信を実現するためのクラスです。

...ire 'openssl'
include OpenSSL

soc = TCPSocket.new('www.example.com', 443)
ssl = SSL::SSLSocket.new(soc)
ssl.connect
ssl.post_connection_check('www.example.com')
raise "verification error" if ssl.verify_result != OpenSSL::X509::V_OK
ssl.write('hoge')
print ssl.peer_cert.to_text
s...

絞り込み条件を変える

<< < 1 2 >>