Class: Digest::Base
Overview
This abstract class provides a common interface to message digest implementation classes written in C.
Instance Method Summary collapse
-
#<< ⇒ Object
:nodoc:.
-
#block_length ⇒ Object
:nodoc:.
-
#digest_length ⇒ Object
:nodoc:.
-
#initialize_copy ⇒ Object
:nodoc:.
-
#reset ⇒ Object
:nodoc:.
-
#update ⇒ Object
:nodoc:.
Methods inherited from Class
base64digest, bubblebabble, digest, file, hexdigest, #initialize
Methods included from Instance
#==, #base64digest, #base64digest!, #bubblebabble, #digest, #digest!, #file, #hexdigest, #hexdigest!, #inspect, #length, #new, #size, #to_s
Constructor Details
This class inherits a constructor from Digest::Class
Instance Method Details
#<< ⇒ Object
:nodoc:
595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 |
# File 'digest.c', line 595 static VALUE rb_digest_base_update(VALUE self, VALUE str) { *algo; void *pctx; algo = (rb_obj_class(self)); Data_Get_Struct(self, void, pctx); StringValue(str); algo->update_func(pctx, (unsigned char *)RSTRING_PTR(str), RSTRING_LEN(str)); return self; } |
#block_length ⇒ Object
:nodoc:
644 645 646 647 648 649 650 651 652 |
# File 'digest.c', line 644 static VALUE rb_digest_base_block_length(VALUE self) { *algo; algo = (rb_obj_class(self)); return INT2NUM(algo->block_len); } |
#digest_length ⇒ Object
:nodoc:
633 634 635 636 637 638 639 640 641 |
# File 'digest.c', line 633 static VALUE rb_digest_base_digest_length(VALUE self) { *algo; algo = (rb_obj_class(self)); return INT2NUM(algo->digest_len); } |
#initialize_copy ⇒ Object
:nodoc:
559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 |
# File 'digest.c', line 559 static VALUE rb_digest_base_copy(VALUE copy, VALUE obj) { *algo; void *pctx1, *pctx2; if (copy == obj) return copy; rb_check_frozen(copy); algo = (rb_obj_class(copy)); Data_Get_Struct(obj, void, pctx1); Data_Get_Struct(copy, void, pctx2); memcpy(pctx2, pctx1, algo->ctx_size); return copy; } |
#reset ⇒ Object
:nodoc:
579 580 581 582 583 584 585 586 587 588 589 590 591 592 |
# File 'digest.c', line 579 static VALUE rb_digest_base_reset(VALUE self) { *algo; void *pctx; algo = (rb_obj_class(self)); Data_Get_Struct(self, void, pctx); algo->init_func(pctx); return self; } |
#update ⇒ Object
:nodoc:
595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 |
# File 'digest.c', line 595 static VALUE rb_digest_base_update(VALUE self, VALUE str) { *algo; void *pctx; algo = (rb_obj_class(self)); Data_Get_Struct(self, void, pctx); StringValue(str); algo->update_func(pctx, (unsigned char *)RSTRING_PTR(str), RSTRING_LEN(str)); return self; } |