473件ヒット
[201-300件を表示]
(0.057秒)
ライブラリ
- csv (24)
- json (60)
- openssl (216)
-
rdoc
/ generator / darkfish (12) -
rdoc
/ generator / json _ index (12) -
rdoc
/ generator / ri (12) -
rubygems
/ commands / generate _ index _ command (12) -
rubygems
/ doc _ manager (24) -
rubygems
/ indexer (12) -
rubygems
/ installer (36)
クラス
- CSV (24)
-
Gem
:: DocManager (24) -
Gem
:: Indexer (12) -
Gem
:: Installer (36) -
JSON
:: State (36) -
OpenSSL
:: BN (12) -
OpenSSL
:: PKey :: DH (108) -
OpenSSL
:: PKey :: DSA (72) -
RDoc
:: Generator :: Darkfish (12) -
RDoc
:: Generator :: JsonIndex (12) -
RDoc
:: Generator :: RI (12)
モジュール
- JSON (24)
キーワード
- DH (12)
- GenerateIndexCommand (12)
-
NEWS for Ruby 3
. 0 . 0 (5) - Random (12)
-
create
_ id (12) - dump (12)
-
generate
_ bin _ script (12) -
generate
_ bin _ symlink (12) -
generate
_ index (12) -
generate
_ key! (12) -
generate
_ prime (12) -
generate
_ rdoc (12) -
generate
_ ri (12) -
generate
_ windows _ script (12) - indent (12)
- indent= (12)
-
max
_ nesting= (12) - new (96)
-
params
_ ok? (12) -
priv
_ key= (12) -
pub
_ key= (12) -
rdoc
/ generator (12) -
rdoc
/ generator / json _ index (12) -
rubygems
/ commands / generate _ index _ command (12) -
rubygems
/ commands / lock _ command (12) -
write
_ headers? (12)
検索結果
先頭5件
-
OpenSSL
:: BN . generate _ prime(bits , safe=true , add=nil , rem=nil) -> OpenSSL :: BN (6201.0) -
ランダム(擬似乱数的)な bits ビットの素数を返します。
...します。
add に整数を渡すと、 p % add == rem であるような
素数pのみを返します。rem が nil の場合は rem=1と見なします。
@param bits 生成するランダム素数のビット数
@param safe true で安全な素数のみを生成する
@param add 生成する... -
CSV
# write _ headers? -> bool (6112.0) -
ヘッダを出力先に書き込む場合は真を返します。 そうでない場合は偽を返します。
...("date1,date2\n2018-07-09,2018-07-10")
csv.write_headers? # => nil
header = ["header1", "header2"]
row = ["row1_1", "row1_2"]
result = CSV.generate(headers: header, write_headers: false) do |csv|
csv.write_headers? # => false
csv << row
end
result # => "row1_1,row1_2\n"
result = CSV.generate(h......eaders: header, write_headers: true) do |csv|
csv.write_headers? # => true
csv << row
end
result # => "header1,header2\nrow1_1,row1_2\n"
//}
@see CSV.new... -
JSON
:: State # indent=(string) (6112.0) -
インデントに使用する文字列をセットします。
...[ruby]{
require "json"
json_state = JSON::State.new(indent: "\t")
json_state.indent # => "\t"
JSON.generate({key1: "value1", key2: "value2"}, json_state)
# => "{\t\"key1\":\"value1\",\t\"key2\":\"value2\"}"
json_state.indent = " "
JSON.generate({key1: "value1", key2: "value2"}, json_state)
# => "{... -
JSON
. # dump(object , io = nil , limit = nil) -> String | IO (6106.0) -
与えられたオブジェクトを JSON 形式の文字列に変換してダンプします。
...たオブジェクトを JSON 形式の文字列に変換してダンプします。
与えられたオブジェクトを引数として JSON.#generate を呼び出します。
@param object ダンプするオブジェクトを指定します。
@param io IO のように write メソッドを......e "json"
JSON.dump({ name: "tanaka", age: 19 }) # => "{\"name\":\"tanaka\",\"age\":19}"
//}
//emlist[例][ruby]{
require "json"
File.open("test.txt", "w") do |f|
JSON.dump([[[[[[[[[[]]]]]]]]]], f, 10) # => #<File:test.txt>
JSON.dump([[[[[[[[[[[]]]]]]]]]]], f, 10) # => exceed depth limit (Ar......gumentError)
end
//}
@see Marshal, Marshal.#dump... -
JSON
. create _ id -> String (6106.0) -
json_create メソッドで使用するクラスを決定するために使用する値を返します。
...ass User
attr :id, :name
def initialize(id, name)
@id, @name = id, name
end
def self.json_create(object)
new(object['id'], object["name"])
end
def as_json(*)
{
JSON.create_id => self.class.name,
"id" => id,
"name" => name,
}
end
def to_json(*)......as_json.to_json
end
end
json = JSON.generate(User.new(1, "tanaka"))
json # => "{\"json_class\":\"User\",\"id\":1,\"name\":\"tanaka\"}"
JSON.parse(json, create_additions: true)
# => #<User:0x0000557709b269e0 @id=1, @name="tanaka">
//}... -
JSON
:: State # indent -> String (6106.0) -
インデントに使用する文字列を返します。
...インデントに使用する文字列を返します。
//emlist[例][ruby]{
require "json"
json_state = JSON::State.new(indent: "\t")
json_state.indent # => "\t"
JSON.generate({key1: "value1", key2: "value2"}, json_state)
# => "{\t\"key1\":\"value1\",\t\"key2\":\"value2\"}"
//}... -
OpenSSL
:: Random (6024.0) -
OpenSSL が利用する擬似乱数生成器関連のモジュールです。
...ます。
このようなメソッドには以下のものがあります。
* OpenSSL::PKey::RSA.generate
* OpenSSL::PKey::DSA.generate
* OpenSSL::PKey::DH.generate
* OpenSSL::Cipher#random_key
そのような乱数は適切な実装を持つ擬似乱数生成器に適切なシードを渡......N.rand
* OpenSSL::BN.rand_range
* OpenSSL::BN.generate_prime
* OpenSSL::Cipher#random_iv
などでも利用されます。
擬似乱数生成器は適切なシードを与えられなければ正しく動作しません。
OpenSSL にはそのための API
* OpenSSL::Random.#random_add
*......OpenSSL::Random.#seed
* OpenSSL::Random.#load_random_file
が存在します。これらの API を模式的に説明すると、以下のようになります。
* シードの各ビットは統計的な乱雑さ、予測不可能性を持ち、ビット列の
乱雑さはエントロピ... -
OpenSSL
:: PKey :: DH (6018.0) -
Diffie-Hellman 鍵共有クラス
...Diffie-Hellman 鍵共有クラス
Diffie-Hellman 鍵共有プロトコルは署名ができないため、
OpenSSL::PKey::PKey#sign や OpenSSL::PKey::PKey#verify
を呼び署名や署名の検証を行おうとすると例外
OpenSSL::PKey::PKeyError が発生します。
Diffie-Hellman はこ......require 'openssl'
# パラメータの生成
dh = OpenSSL::PKey::DH.generate(1024, 5)
# パラメータのチェック
raise "bad DH parameter" unless dh.params_ok?
# 以下、dh1 と dh2 が通信の両端であるとする
# dh1 と dh2 は鍵パラメータ p と g を共有しな......することにしている
# dh1 は dh をそのまま使う
dh1 = dh
# パラメータを複製して dh2 に渡す
dh2 = OpenSSL::PKey::DH.new(dh)
# 両端が鍵パラメータから鍵対を生成する
dh1.generate_key!
dh2.generate_key!
# 通信の両端で公開鍵を... -
rdoc
/ generator / json _ index (6012.0) -
他のジェネレータが生成する HTML で検索が行えるように、JSON の検索インデッ クスを生成するサブライブラリです。
...is derived from sdoc by Vladimir Kolesnikov and
contains verbatim code written by him.
このジェネレータは HTML ジェネレータと一緒に使うために設計されています。:
class RDoc::Generator::Darkfish
def initialize options
# ...
@base_dir = Pathname.pwd.......expand_path
@json_index = RDoc::Generator::JsonIndex.new self, options
end
def generate
# ...
@json_index.generate
end
end
=== インデックスフォーマット
検索用のインデックスは JSON ファイルに出力されます。search_data という
グ......var search_data = {
"index": {
"searchIndex":
["a", "b", ...],
"longSearchIndex":
["a", "a::b", ...],
"info": [
["A", "A", "A.html", "", ""],
["B", "A::B", "A::B.html", "", ""],
...
]
}
}
searchIndex、longSearchIndex、info...