/* $RoughId: sha1init.c,v 1.2 2001/07/13 19:49:10 knu Exp $ */ /* $Id$ */ #include "digest.h" #if defined(HAVE_OPENSSL_SHA_H) #include "sha1ossl.h" #else #include "sha1.h" #endif static rb_digest_metadata_t sha1 = { RUBY_DIGEST_API_VERSION, SHA1_DIGEST_LENGTH, SHA1_BLOCK_LENGTH, sizeof(SHA1_CTX), (rb_digest_hash_init_func_t)SHA1_Init, (rb_digest_hash_update_func_t)SHA1_Update, (rb_digest_hash_finish_func_t)SHA1_Finish, }; /* * A class for calculating message digests using the SHA-1 Secure Hash * Algorithm by NIST (the US' National Institute of Standards and * Technology), described in FIPS PUB 180-1. */ void Init_sha1() { VALUE mDigest, cDigest_Base, cDigest_SHA1; rb_require("digest"); mDigest = rb_path2class("Digest"); cDigest_Base = rb_path2class("Digest::Base"); cDigest_SHA1 = rb_define_class_under(mDigest, "SHA1", cDigest_Base); rb_ivar_set(cDigest_SHA1, rb_intern("metadata"), Data_Wrap_Struct(rb_cObject, 0, 0, &sha1)); } ption value='ruby_1_8_7'>ruby_1_8_7 The Ruby Programming Language
summaryrefslogtreecommitdiff
path: root/doc/syntax.rdoc
AgeCommit message (Expand)Author
2023-09-20doc: initial operators commitNicholas Browning
2020-02-24Add pattern matching documentationzverok
2019-12-29syntax.rdoc: remove "experimental" from refinements (#2796)Vladimir Dementyev
2019-10-26Documentation improvements for Ruby corezverok
2013-01-24* doc/syntax/refinements.rdoc: Added refinements document based ondrbrain
2013-01-19 * doc/syntax/assignment.rdoc: Improved linksdrbrain
2013-01-16* doc/syntax/miscellaneous.rdoc: Added documentation for alias, undef,drbrain
2013-01-15* doc/syntax/methods.rdoc: Fixed linkdrbrain
2012-12-17* doc/syntax.rdoc: Added syntax guide table of contentsdrbrain