rbs 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +5 -0
- data/CHANGELOG.md +23 -0
- data/README.md +6 -1
- data/core/array.rbs +2866 -1086
- data/core/basic_object.rbs +150 -30
- data/core/binding.rbs +33 -0
- data/core/builtin.rbs +4 -4
- data/core/class.rbs +43 -5
- data/core/comparable.rbs +57 -0
- data/core/complex.rbs +170 -4
- data/core/constants.rbs +51 -0
- data/core/deprecated.rbs +7 -0
- data/core/dir.rbs +305 -20
- data/core/encoding.rbs +472 -77
- data/core/enumerable.rbs +2173 -234
- data/core/enumerator.rbs +448 -182
- data/core/env.rbs +448 -1
- data/core/errno.rbs +1 -10
- data/core/errors.rbs +152 -2
- data/core/exception.rbs +201 -127
- data/core/false_class.rbs +27 -0
- data/core/fiber.rbs +118 -37
- data/core/fiber_error.rbs +8 -9
- data/core/file.rbs +1059 -139
- data/core/file_test.rbs +287 -32
- data/core/float.rbs +776 -300
- data/core/gc.rbs +185 -34
- data/core/global_variables.rbs +5 -1
- data/core/hash.rbs +1582 -649
- data/core/integer.rbs +974 -204
- data/core/io/buffer.rbs +710 -0
- data/core/io/wait.rbs +29 -8
- data/core/io.rbs +2438 -417
- data/core/kernel.rbs +2315 -316
- data/core/marshal.rbs +37 -2
- data/core/match_data.rbs +123 -6
- data/core/math.rbs +126 -6
- data/core/method.rbs +226 -102
- data/core/module.rbs +421 -45
- data/core/nil_class.rbs +64 -0
- data/core/numeric.rbs +620 -142
- data/core/object.rbs +453 -81
- data/core/object_space.rbs +92 -2
- data/core/proc.rbs +482 -285
- data/core/process.rbs +443 -34
- data/core/ractor.rbs +232 -9
- data/core/random.rbs +151 -52
- data/core/range.rbs +885 -160
- data/core/rational.rbs +122 -6
- data/core/rb_config.rbs +14 -4
- data/core/refinement.rbs +44 -0
- data/core/regexp.rbs +156 -14
- data/core/ruby_vm.rbs +42 -3
- data/core/signal.rbs +78 -39
- data/core/string.rbs +2123 -567
- data/core/string_io.rbs +204 -0
- data/core/struct.rbs +283 -28
- data/core/symbol.rbs +304 -30
- data/core/thread.rbs +1288 -688
- data/core/thread_group.rbs +66 -10
- data/core/time.rbs +643 -217
- data/core/trace_point.rbs +100 -12
- data/core/true_class.rbs +24 -0
- data/core/unbound_method.rbs +73 -7
- data/core/warning.rbs +37 -12
- data/docs/CONTRIBUTING.md +40 -34
- data/docs/stdlib.md +3 -102
- data/lib/rbs/annotate/annotations.rb +197 -0
- data/lib/rbs/annotate/formatter.rb +80 -0
- data/lib/rbs/annotate/rdoc_annotator.rb +398 -0
- data/lib/rbs/annotate/rdoc_source.rb +120 -0
- data/lib/rbs/annotate.rb +6 -0
- data/lib/rbs/cli.rb +45 -1
- data/lib/rbs/definition_builder.rb +5 -1
- data/lib/rbs/location_aux.rb +12 -0
- data/lib/rbs/prototype/rb.rb +12 -0
- data/lib/rbs/version.rb +1 -1
- data/sig/annotate/annotations.rbs +102 -0
- data/sig/annotate/formatter.rbs +24 -0
- data/sig/annotate/rdoc_annotater.rbs +82 -0
- data/sig/annotate/rdoc_source.rbs +30 -0
- data/sig/cli.rbs +2 -0
- data/sig/collection/{collections.rbs → sources.rbs} +0 -0
- data/sig/location.rbs +6 -0
- data/sig/method_types.rbs +5 -1
- data/sig/polyfill.rbs +78 -0
- data/stdlib/abbrev/0/abbrev.rbs +6 -0
- data/stdlib/abbrev/0/array.rbs +26 -0
- data/stdlib/base64/0/base64.rbs +31 -0
- data/stdlib/benchmark/0/benchmark.rbs +74 -3
- data/stdlib/bigdecimal/0/big_decimal.rbs +614 -165
- data/stdlib/bigdecimal-math/0/big_math.rbs +41 -64
- data/stdlib/cgi/0/core.rbs +59 -0
- data/stdlib/coverage/0/coverage.rbs +164 -2
- data/stdlib/csv/0/csv.rbs +2862 -398
- data/stdlib/date/0/date.rbs +483 -25
- data/stdlib/date/0/date_time.rbs +187 -12
- data/stdlib/dbm/0/dbm.rbs +152 -17
- data/stdlib/digest/0/digest.rbs +146 -0
- data/stdlib/erb/0/erb.rbs +65 -245
- data/stdlib/fiber/0/fiber.rbs +73 -91
- data/stdlib/fileutils/0/fileutils.rbs +301 -1
- data/stdlib/find/0/find.rbs +9 -0
- data/stdlib/forwardable/0/forwardable.rbs +65 -1
- data/stdlib/io-console/0/io-console.rbs +227 -15
- data/stdlib/ipaddr/0/ipaddr.rbs +161 -0
- data/stdlib/json/0/json.rbs +1146 -144
- data/stdlib/logger/0/formatter.rbs +24 -0
- data/stdlib/logger/0/log_device.rbs +64 -0
- data/stdlib/logger/0/logger.rbs +165 -13
- data/stdlib/logger/0/period.rbs +10 -0
- data/stdlib/logger/0/severity.rbs +26 -0
- data/stdlib/monitor/0/monitor.rbs +163 -0
- data/stdlib/mutex_m/0/mutex_m.rbs +35 -6
- data/stdlib/net-http/0/net-http.rbs +1492 -683
- data/stdlib/nkf/0/nkf.rbs +372 -0
- data/stdlib/objspace/0/objspace.rbs +149 -90
- data/stdlib/openssl/0/openssl.rbs +8108 -71
- data/stdlib/optparse/0/optparse.rbs +487 -19
- data/stdlib/pathname/0/pathname.rbs +425 -124
- data/stdlib/prettyprint/0/prettyprint.rbs +120 -99
- data/stdlib/prime/0/integer-extension.rbs +20 -2
- data/stdlib/prime/0/prime.rbs +88 -21
- data/stdlib/pstore/0/pstore.rbs +102 -0
- data/stdlib/pty/0/pty.rbs +64 -14
- data/stdlib/resolv/0/resolv.rbs +420 -31
- data/stdlib/rubygems/0/basic_specification.rbs +4 -1
- data/stdlib/rubygems/0/config_file.rbs +33 -1
- data/stdlib/rubygems/0/dependency_installer.rbs +4 -3
- data/stdlib/rubygems/0/installer.rbs +13 -1
- data/stdlib/rubygems/0/path_support.rbs +4 -1
- data/stdlib/rubygems/0/platform.rbs +5 -1
- data/stdlib/rubygems/0/request_set.rbs +44 -2
- data/stdlib/rubygems/0/requirement.rbs +65 -2
- data/stdlib/rubygems/0/rubygems.rbs +407 -0
- data/stdlib/rubygems/0/source_list.rbs +13 -0
- data/stdlib/rubygems/0/specification.rbs +21 -1
- data/stdlib/rubygems/0/stream_ui.rbs +3 -1
- data/stdlib/rubygems/0/uninstaller.rbs +8 -1
- data/stdlib/rubygems/0/version.rbs +60 -157
- data/stdlib/securerandom/0/securerandom.rbs +44 -0
- data/stdlib/set/0/set.rbs +420 -106
- data/stdlib/shellwords/0/shellwords.rbs +55 -77
- data/stdlib/singleton/0/singleton.rbs +20 -0
- data/stdlib/socket/0/addrinfo.rbs +210 -9
- data/stdlib/socket/0/basic_socket.rbs +103 -11
- data/stdlib/socket/0/ip_socket.rbs +31 -9
- data/stdlib/socket/0/socket.rbs +586 -38
- data/stdlib/socket/0/tcp_server.rbs +22 -2
- data/stdlib/socket/0/tcp_socket.rbs +12 -1
- data/stdlib/socket/0/udp_socket.rbs +25 -2
- data/stdlib/socket/0/unix_server.rbs +22 -2
- data/stdlib/socket/0/unix_socket.rbs +45 -5
- data/stdlib/strscan/0/string_scanner.rbs +210 -9
- data/stdlib/tempfile/0/tempfile.rbs +58 -10
- data/stdlib/time/0/time.rbs +208 -116
- data/stdlib/timeout/0/timeout.rbs +10 -0
- data/stdlib/tmpdir/0/tmpdir.rbs +13 -4
- data/stdlib/tsort/0/cyclic.rbs +1 -0
- data/stdlib/tsort/0/interfaces.rbs +1 -0
- data/stdlib/tsort/0/tsort.rbs +42 -0
- data/stdlib/uri/0/common.rbs +57 -8
- data/stdlib/uri/0/file.rbs +55 -109
- data/stdlib/uri/0/ftp.rbs +6 -3
- data/stdlib/uri/0/generic.rbs +556 -327
- data/stdlib/uri/0/http.rbs +26 -115
- data/stdlib/uri/0/https.rbs +8 -102
- data/stdlib/uri/0/ldap.rbs +143 -137
- data/stdlib/uri/0/ldaps.rbs +8 -102
- data/stdlib/uri/0/mailto.rbs +3 -0
- data/stdlib/uri/0/rfc2396_parser.rbs +66 -26
- data/stdlib/uri/0/ws.rbs +6 -3
- data/stdlib/uri/0/wss.rbs +5 -3
- data/stdlib/yaml/0/dbm.rbs +151 -87
- data/stdlib/yaml/0/store.rbs +6 -0
- data/stdlib/zlib/0/zlib.rbs +90 -31
- metadata +17 -5
- data/lib/rbs/location.rb +0 -221
data/stdlib/digest/0/digest.rbs
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# <!-- rdoc-file=ext/digest/digest.c -->
|
1
2
|
# This module provides a framework for message digest libraries.
|
2
3
|
#
|
3
4
|
# You may want to look at OpenSSL::Digest as it supports more algorithms.
|
@@ -65,13 +66,22 @@
|
|
65
66
|
#
|
66
67
|
# The latest versions of the FIPS publications can be found here:
|
67
68
|
# http://csrc.nist.gov/publications/PubsFIPS.html.
|
69
|
+
#
|
68
70
|
module Digest
|
71
|
+
# <!--
|
72
|
+
# rdoc-file=ext/digest/bubblebabble/bubblebabble.c
|
73
|
+
# - Digest.bubblebabble(string) -> bubblebabble_string
|
74
|
+
# -->
|
69
75
|
# Returns a BubbleBabble encoded version of a given *string*.
|
70
76
|
#
|
71
77
|
def self.bubblebabble: (String) -> String
|
72
78
|
|
73
79
|
def self.const_missing: (Symbol name) -> singleton(::Digest::Base)
|
74
80
|
|
81
|
+
# <!--
|
82
|
+
# rdoc-file=ext/digest/digest.c
|
83
|
+
# - Digest.hexencode(string) -> hexencoded_string
|
84
|
+
# -->
|
75
85
|
# Generates a hex-encoded version of a given *string*.
|
76
86
|
#
|
77
87
|
def self.hexencode: (String) -> String
|
@@ -83,14 +93,19 @@ module Digest
|
|
83
93
|
def hexencode: (String) -> String
|
84
94
|
end
|
85
95
|
|
96
|
+
# <!-- rdoc-file=ext/digest/lib/digest.rb -->
|
86
97
|
# A mutex for Digest().
|
98
|
+
#
|
87
99
|
Digest::REQUIRE_MUTEX: Thread::Mutex
|
88
100
|
|
101
|
+
# <!-- rdoc-file=ext/digest/digest.c -->
|
89
102
|
# This module provides instance methods for a digest implementation object to
|
90
103
|
# calculate message digest values.
|
104
|
+
#
|
91
105
|
module Digest::Instance
|
92
106
|
public
|
93
107
|
|
108
|
+
# <!-- rdoc-file=ext/digest/digest.c -->
|
94
109
|
# Updates the digest using a given *string* and returns self.
|
95
110
|
#
|
96
111
|
# The update() method and the left-shift operator are overridden by each
|
@@ -98,12 +113,21 @@ module Digest::Instance
|
|
98
113
|
#
|
99
114
|
def <<: (String) -> self
|
100
115
|
|
116
|
+
# <!--
|
117
|
+
# rdoc-file=ext/digest/digest.c
|
118
|
+
# - digest_obj == another_digest_obj -> boolean
|
119
|
+
# - digest_obj == string -> boolean
|
120
|
+
# -->
|
101
121
|
# If a string is given, checks whether it is equal to the hex-encoded hash value
|
102
122
|
# of the digest object. If another digest instance is given, checks whether
|
103
123
|
# they have the same hash value. Otherwise returns false.
|
104
124
|
#
|
105
125
|
def ==: (::Digest::Instance | String) -> bool
|
106
126
|
|
127
|
+
# <!--
|
128
|
+
# rdoc-file=ext/digest/lib/digest.rb
|
129
|
+
# - base64digest(str = nil)
|
130
|
+
# -->
|
107
131
|
# If none is given, returns the resulting hash value of the digest in a base64
|
108
132
|
# encoded form, keeping the digest's state.
|
109
133
|
#
|
@@ -116,20 +140,37 @@ module Digest::Instance
|
|
116
140
|
#
|
117
141
|
def base64digest: (?String? str) -> String
|
118
142
|
|
143
|
+
# <!--
|
144
|
+
# rdoc-file=ext/digest/lib/digest.rb
|
145
|
+
# - base64digest!()
|
146
|
+
# -->
|
119
147
|
# Returns the resulting hash value and resets the digest to the initial state.
|
120
148
|
#
|
121
149
|
def base64digest!: () -> String
|
122
150
|
|
151
|
+
# <!--
|
152
|
+
# rdoc-file=ext/digest/digest.c
|
153
|
+
# - digest_obj.block_length -> integer
|
154
|
+
# -->
|
123
155
|
# Returns the block length of the digest.
|
124
156
|
#
|
125
157
|
# This method is overridden by each implementation subclass.
|
126
158
|
#
|
127
159
|
def block_length: () -> Integer
|
128
160
|
|
161
|
+
# <!--
|
162
|
+
# rdoc-file=ext/digest/bubblebabble/bubblebabble.c
|
163
|
+
# - digest_obj.bubblebabble -> hash_string
|
164
|
+
# -->
|
129
165
|
# Returns the resulting hash value in a Bubblebabble encoded form.
|
130
166
|
#
|
131
167
|
def bubblebabble: () -> String
|
132
168
|
|
169
|
+
# <!--
|
170
|
+
# rdoc-file=ext/digest/digest.c
|
171
|
+
# - digest_obj.digest -> string
|
172
|
+
# - digest_obj.digest(string) -> string
|
173
|
+
# -->
|
133
174
|
# If none is given, returns the resulting hash value of the digest, keeping the
|
134
175
|
# digest's state.
|
135
176
|
#
|
@@ -138,10 +179,18 @@ module Digest::Instance
|
|
138
179
|
#
|
139
180
|
def digest: (?String) -> String
|
140
181
|
|
182
|
+
# <!--
|
183
|
+
# rdoc-file=ext/digest/digest.c
|
184
|
+
# - digest_obj.digest! -> string
|
185
|
+
# -->
|
141
186
|
# Returns the resulting hash value and resets the digest to the initial state.
|
142
187
|
#
|
143
188
|
def digest!: () -> String
|
144
189
|
|
190
|
+
# <!--
|
191
|
+
# rdoc-file=ext/digest/digest.c
|
192
|
+
# - digest_obj.digest_length -> integer
|
193
|
+
# -->
|
145
194
|
# Returns the length of the hash value of the digest.
|
146
195
|
#
|
147
196
|
# This method should be overridden by each implementation subclass. If not,
|
@@ -149,10 +198,19 @@ module Digest::Instance
|
|
149
198
|
#
|
150
199
|
def digest_length: () -> Integer
|
151
200
|
|
201
|
+
# <!--
|
202
|
+
# rdoc-file=ext/digest/lib/digest.rb
|
203
|
+
# - file(name)
|
204
|
+
# -->
|
152
205
|
# Updates the digest with the contents of a given file *name* and returns self.
|
153
206
|
#
|
154
207
|
def file: (String name) -> self
|
155
208
|
|
209
|
+
# <!--
|
210
|
+
# rdoc-file=ext/digest/digest.c
|
211
|
+
# - digest_obj.hexdigest -> string
|
212
|
+
# - digest_obj.hexdigest(string) -> string
|
213
|
+
# -->
|
156
214
|
# If none is given, returns the resulting hash value of the digest in a
|
157
215
|
# hex-encoded form, keeping the digest's state.
|
158
216
|
#
|
@@ -162,38 +220,69 @@ module Digest::Instance
|
|
162
220
|
#
|
163
221
|
def hexdigest: (?String) -> String
|
164
222
|
|
223
|
+
# <!--
|
224
|
+
# rdoc-file=ext/digest/digest.c
|
225
|
+
# - digest_obj.hexdigest! -> string
|
226
|
+
# -->
|
165
227
|
# Returns the resulting hash value in a hex-encoded form and resets the digest
|
166
228
|
# to the initial state.
|
167
229
|
#
|
168
230
|
def hexdigest!: () -> String
|
169
231
|
|
232
|
+
# <!--
|
233
|
+
# rdoc-file=ext/digest/digest.c
|
234
|
+
# - digest_obj.inspect -> string
|
235
|
+
# -->
|
170
236
|
# Creates a printable version of the digest object.
|
171
237
|
#
|
172
238
|
def inspect: () -> String
|
173
239
|
|
240
|
+
# <!--
|
241
|
+
# rdoc-file=ext/digest/digest.c
|
242
|
+
# - digest_obj.length -> integer
|
243
|
+
# - digest_obj.size -> integer
|
244
|
+
# -->
|
174
245
|
# Returns digest_obj.digest_length().
|
175
246
|
#
|
176
247
|
def length: () -> Integer
|
177
248
|
|
249
|
+
# <!--
|
250
|
+
# rdoc-file=ext/digest/digest.c
|
251
|
+
# - digest_obj.new -> another_digest_obj
|
252
|
+
# -->
|
178
253
|
# Returns a new, initialized copy of the digest object. Equivalent to
|
179
254
|
# digest_obj.clone().reset().
|
180
255
|
#
|
181
256
|
def new: () -> ::Digest::Base
|
182
257
|
|
258
|
+
# <!--
|
259
|
+
# rdoc-file=ext/digest/digest.c
|
260
|
+
# - digest_obj.reset -> digest_obj
|
261
|
+
# -->
|
183
262
|
# Resets the digest to the initial state and returns self.
|
184
263
|
#
|
185
264
|
# This method is overridden by each implementation subclass.
|
186
265
|
#
|
187
266
|
def reset: () -> self
|
188
267
|
|
268
|
+
# <!-- rdoc-file=ext/digest/digest.c -->
|
189
269
|
# Returns digest_obj.digest_length().
|
190
270
|
#
|
191
271
|
def size: () -> Integer
|
192
272
|
|
273
|
+
# <!--
|
274
|
+
# rdoc-file=ext/digest/digest.c
|
275
|
+
# - digest_obj.to_s -> string
|
276
|
+
# -->
|
193
277
|
# Returns digest_obj.hexdigest().
|
194
278
|
#
|
195
279
|
def to_s: () -> String
|
196
280
|
|
281
|
+
# <!--
|
282
|
+
# rdoc-file=ext/digest/digest.c
|
283
|
+
# - digest_obj.update(string) -> digest_obj
|
284
|
+
# - digest_obj << string -> digest_obj
|
285
|
+
# -->
|
197
286
|
# Updates the digest using a given *string* and returns self.
|
198
287
|
#
|
199
288
|
# The update() method and the left-shift operator are overridden by each
|
@@ -203,6 +292,10 @@ module Digest::Instance
|
|
203
292
|
|
204
293
|
private
|
205
294
|
|
295
|
+
# <!--
|
296
|
+
# rdoc-file=ext/digest/digest.c
|
297
|
+
# - digest_obj.instance_eval { finish } -> digest_obj
|
298
|
+
# -->
|
206
299
|
# Finishes the digest and returns the resulting hash value.
|
207
300
|
#
|
208
301
|
# This method is overridden by each implementation subclass and often made
|
@@ -213,19 +306,33 @@ module Digest::Instance
|
|
213
306
|
def finish: () -> self
|
214
307
|
end
|
215
308
|
|
309
|
+
# <!-- rdoc-file=ext/digest/digest.c -->
|
216
310
|
# This module stands as a base class for digest implementation classes.
|
311
|
+
#
|
217
312
|
class Digest::Class
|
218
313
|
include ::Digest::Instance
|
219
314
|
|
315
|
+
# <!--
|
316
|
+
# rdoc-file=ext/digest/lib/digest.rb
|
317
|
+
# - base64digest(str, *args)
|
318
|
+
# -->
|
220
319
|
# Returns the base64 encoded hash value of a given *string*. The return value
|
221
320
|
# is properly padded with '=' and contains no line feeds.
|
222
321
|
#
|
223
322
|
def self.base64digest: (String str, *untyped) -> String
|
224
323
|
|
324
|
+
# <!--
|
325
|
+
# rdoc-file=ext/digest/bubblebabble/bubblebabble.c
|
326
|
+
# - Digest::Class.bubblebabble(string, ...) -> hash_string
|
327
|
+
# -->
|
225
328
|
# Returns the BubbleBabble encoded hash value of a given *string*.
|
226
329
|
#
|
227
330
|
def self.bubblebabble: (String, *untyped) -> String
|
228
331
|
|
332
|
+
# <!--
|
333
|
+
# rdoc-file=ext/digest/digest.c
|
334
|
+
# - Digest::Class.digest(string, *parameters) -> hash_string
|
335
|
+
# -->
|
229
336
|
# Returns the hash value of a given *string*. This is equivalent to
|
230
337
|
# Digest::Class.new(*parameters).digest(string), where extra *parameters*, if
|
231
338
|
# any, are passed through to the constructor and the *string* is passed to
|
@@ -233,6 +340,10 @@ class Digest::Class
|
|
233
340
|
#
|
234
341
|
def self.digest: (String, *untyped) -> String
|
235
342
|
|
343
|
+
# <!--
|
344
|
+
# rdoc-file=ext/digest/lib/digest.rb
|
345
|
+
# - file(name, *args)
|
346
|
+
# -->
|
236
347
|
# Creates a digest object and reads a given file, *name*. Optional arguments are
|
237
348
|
# passed to the constructor of the digest class.
|
238
349
|
#
|
@@ -241,6 +352,10 @@ class Digest::Class
|
|
241
352
|
#
|
242
353
|
def self.file: (String name, *untyped) -> ::Digest::Class
|
243
354
|
|
355
|
+
# <!--
|
356
|
+
# rdoc-file=ext/digest/digest.c
|
357
|
+
# - Digest::Class.hexdigest(string[, ...]) -> hash_string
|
358
|
+
# -->
|
244
359
|
# Returns the hex-encoded hash value of a given *string*. This is almost
|
245
360
|
# equivalent to Digest.hexencode(Digest::Class.new(*parameters).digest(string)).
|
246
361
|
#
|
@@ -251,6 +366,7 @@ class Digest::Class
|
|
251
366
|
def initialize: () -> self
|
252
367
|
end
|
253
368
|
|
369
|
+
# <!-- rdoc-file=ext/digest/digest.c -->
|
254
370
|
# This abstract class provides a common interface to message digest
|
255
371
|
# implementation classes written in C.
|
256
372
|
#
|
@@ -285,25 +401,44 @@ end
|
|
285
401
|
#
|
286
402
|
# rb_ivar_set(cDigest_SHA1, rb_intern("metadata"),
|
287
403
|
# Data_Wrap_Struct(0, 0, 0, (void *)&sha1));
|
404
|
+
#
|
288
405
|
class Digest::Base < Digest::Class
|
289
406
|
public
|
290
407
|
|
408
|
+
# <!-- rdoc-file=ext/digest/digest.c -->
|
291
409
|
# Update the digest using given *string* and return `self`.
|
292
410
|
#
|
293
411
|
def <<: (String) -> self
|
294
412
|
|
413
|
+
# <!--
|
414
|
+
# rdoc-file=ext/digest/digest.c
|
415
|
+
# - digest_base.block_length -> Integer
|
416
|
+
# -->
|
295
417
|
# Return the block length of the digest in bytes.
|
296
418
|
#
|
297
419
|
def block_length: () -> Integer
|
298
420
|
|
421
|
+
# <!--
|
422
|
+
# rdoc-file=ext/digest/digest.c
|
423
|
+
# - digest_base.digest_length -> Integer
|
424
|
+
# -->
|
299
425
|
# Return the length of the hash value in bytes.
|
300
426
|
#
|
301
427
|
def digest_length: () -> Integer
|
302
428
|
|
429
|
+
# <!--
|
430
|
+
# rdoc-file=ext/digest/digest.c
|
431
|
+
# - digest_base.reset -> digest_base
|
432
|
+
# -->
|
303
433
|
# Reset the digest to its initial state and return `self`.
|
304
434
|
#
|
305
435
|
def reset: () -> self
|
306
436
|
|
437
|
+
# <!--
|
438
|
+
# rdoc-file=ext/digest/digest.c
|
439
|
+
# - digest_base.update(string) -> digest_base
|
440
|
+
# - digest_base << string -> digest_base
|
441
|
+
# -->
|
307
442
|
# Update the digest using given *string* and return `self`.
|
308
443
|
#
|
309
444
|
def update: (String) -> self
|
@@ -315,6 +450,7 @@ class Digest::Base < Digest::Class
|
|
315
450
|
def initialize_copy: (::Digest::Base) -> self
|
316
451
|
end
|
317
452
|
|
453
|
+
# <!-- rdoc-file=ext/digest/sha1/sha1init.c -->
|
318
454
|
# A class for calculating message digests using the SHA-1 Secure Hash Algorithm
|
319
455
|
# by NIST (the US' National Institute of Standards and Technology), described in
|
320
456
|
# FIPS PUB 180-1.
|
@@ -339,9 +475,11 @@ end
|
|
339
475
|
# sha1.reset
|
340
476
|
# sha1 << "message"
|
341
477
|
# sha1.hexdigest # => "6f9b9af3..."
|
478
|
+
#
|
342
479
|
class Digest::SHA1 < Digest::Base
|
343
480
|
end
|
344
481
|
|
482
|
+
# <!-- rdoc-file=ext/digest/md5/md5init.c -->
|
345
483
|
# A class for calculating message digests using the MD5 Message-Digest Algorithm
|
346
484
|
# by RSA Data Security, Inc., described in RFC1321.
|
347
485
|
#
|
@@ -363,9 +501,11 @@ end
|
|
363
501
|
# md5.reset
|
364
502
|
# md5 << "message"
|
365
503
|
# md5.hexdigest # => "78e73102..."
|
504
|
+
#
|
366
505
|
class Digest::MD5 < Digest::Base
|
367
506
|
end
|
368
507
|
|
508
|
+
# <!-- rdoc-file=ext/digest/rmd160/rmd160init.c -->
|
369
509
|
# A class for calculating message digests using RIPEMD-160 cryptographic hash
|
370
510
|
# function, designed by Hans Dobbertin, Antoon Bosselaers, and Bart Preneel.
|
371
511
|
#
|
@@ -387,6 +527,7 @@ end
|
|
387
527
|
# rmd160.reset
|
388
528
|
# rmd160 << "message"
|
389
529
|
# rmd160.hexdigest # => "1dddbe1b..."
|
530
|
+
#
|
390
531
|
class Digest::RMD160 < Digest::Base
|
391
532
|
end
|
392
533
|
|
@@ -399,7 +540,12 @@ end
|
|
399
540
|
class Digest::SHA512 < Digest::Base
|
400
541
|
end
|
401
542
|
|
543
|
+
%a{annotate:rdoc:skip}
|
402
544
|
class Object
|
545
|
+
# <!--
|
546
|
+
# rdoc-file=ext/digest/lib/digest.rb
|
547
|
+
# - Digest(name) -> digest_subclass
|
548
|
+
# -->
|
403
549
|
# Returns a Digest subclass by `name` in a thread-safe manner even when
|
404
550
|
# on-demand loading is involved.
|
405
551
|
#
|