Skip Navigation Links | |
Exit Print View | |
man pages section 3: Extended Library Functions, Volume 1 Oracle Solaris 11.1 Information Library |
Extended Library Functions, Volume 1
CIRCLEQ_HEAD_INITIALIZER(3EXT)
cpc_walk_generic_events_all(3CPC)
cpc_walk_generic_events_pic(3CPC)
ct_dev_status_get_aset(3CONTRACT)
ct_dev_status_get_dev_state(3CONTRACT)
ct_dev_status_get_minor(3CONTRACT)
ct_dev_status_get_noneg(3CONTRACT)
ct_dev_tmpl_clear_noneg(3CONTRACT)
ct_dev_tmpl_get_aset(3CONTRACT)
ct_dev_tmpl_get_minor(3CONTRACT)
ct_dev_tmpl_get_noneg(3CONTRACT)
ct_dev_tmpl_set_aset(3CONTRACT)
ct_dev_tmpl_set_minor(3CONTRACT)
ct_dev_tmpl_set_noneg(3CONTRACT)
ct_event_read_critical(3CONTRACT)
ct_pr_event_get_exitstatus(3CONTRACT)
ct_pr_event_get_gcorefile(3CONTRACT)
ct_pr_event_get_pcorefile(3CONTRACT)
ct_pr_event_get_pid(3CONTRACT)
ct_pr_event_get_ppid(3CONTRACT)
ct_pr_event_get_sender(3CONTRACT)
ct_pr_event_get_senderct(3CONTRACT)
ct_pr_event_get_signal(3CONTRACT)
ct_pr_event_get_zcorefile(3CONTRACT)
ct_pr_status_get_contracts(3CONTRACT)
ct_pr_status_get_fatal(3CONTRACT)
ct_pr_status_get_members(3CONTRACT)
ct_pr_status_get_param(3CONTRACT)
ct_pr_status_get_svc_aux(3CONTRACT)
ct_pr_status_get_svc_creator(3CONTRACT)
ct_pr_status_get_svc_ctid(3CONTRACT)
ct_pr_status_get_svc_fmri(3CONTRACT)
ct_pr_tmpl_get_fatal(3CONTRACT)
ct_pr_tmpl_get_param(3CONTRACT)
ct_pr_tmpl_get_svc_aux(3CONTRACT)
ct_pr_tmpl_get_svc_fmri(3CONTRACT)
ct_pr_tmpl_get_transfer(3CONTRACT)
ct_pr_tmpl_set_fatal(3CONTRACT)
ct_pr_tmpl_set_param(3CONTRACT)
ct_pr_tmpl_set_svc_aux(3CONTRACT)
ct_pr_tmpl_set_svc_fmri(3CONTRACT)
ct_pr_tmpl_set_transfer(3CONTRACT)
ct_status_get_cookie(3CONTRACT)
ct_status_get_critical(3CONTRACT)
ct_status_get_holder(3CONTRACT)
ct_status_get_informative(3CONTRACT)
ct_status_get_nevents(3CONTRACT)
ct_status_get_nevid(3CONTRACT)
ct_status_get_ntime(3CONTRACT)
ct_status_get_qtime(3CONTRACT)
ct_status_get_state(3CONTRACT)
ct_status_get_zoneid(3CONTRACT)
ct_tmpl_get_critical(3CONTRACT)
ct_tmpl_get_informative(3CONTRACT)
ct_tmpl_set_critical(3CONTRACT)
ct_tmpl_set_informative(3CONTRACT)
dat_evd_clear_unwaitable(3DAT)
dat_get_consumer_context(3DAT)
dat_registry_add_provider(3DAT)
dat_registry_list_providers(3DAT)
dat_registry_remove_provider(3DAT)
dat_set_consumer_context(3DAT)
devid_deviceid_to_nmlist(3DEVID)
di_link_next_by_lnode(3DEVINFO)
di_link_next_by_node(3DEVINFO)
di_lnode_private_get(3DEVINFO)
di_lnode_private_set(3DEVINFO)
di_minor_private_get(3DEVINFO)
di_minor_private_set(3DEVINFO)
di_path_client_devfs_path(3DEVINFO)
di_path_client_next_path(3DEVINFO)
di_path_phci_next_path(3DEVINFO)
di_path_prop_lookup_bytes(3DEVINFO)
di_path_prop_lookup_int64s(3DEVINFO)
di_path_prop_lookup_ints(3DEVINFO)
di_path_prop_lookup_strings(3DEVINFO)
di_path_prop_strings(3DEVINFO)
di_prom_prop_lookup_bytes(3DEVINFO)
di_prom_prop_lookup_ints(3DEVINFO)
di_prom_prop_lookup_strings(3DEVINFO)
di_prop_lookup_bytes(3DEVINFO)
di_prop_lookup_int64(3DEVINFO)
di_prop_lookup_strings(3DEVINFO)
ea_match_object_catalog(3EXACCT)
- MD4 digest functions
cc [ flag ... ] file ... -lmd [ library ... ] #include <md4.h> void MD4Init(MD4_CTX *context);
void MD4Update(MD4_CTX *context, unsigned char *input, unsigned int inlen);
void MD4Final(unsigned char *output, MD4_CTX *context);
The MD4 functions implement the MD4 message-digest algorithm. The algorithm takes as input a message of arbitrary length and produces a “fingerprint” or “message digest” as output. The MD4 message-digest algorithm is intended for digital signature applications in which large files are “compressed” in a secure manner before being encrypted with a private (secret) key under a public-key cryptosystem such as RSA.
The MD4Init(), MD4Update(), and MD4Final() functions allow an MD4 digest to be computed over multiple message blocks. Between blocks, the state of the MD4 computation is held in an MD4 context structure allocated by the caller. A complete digest computation consists of calls to MD4 functions in the following order: one call to MD4Init(), one or more calls to MD4Update(), and one call to MD4Final().
The MD4Init() function initializes the MD4 context structure pointed to by context.
The MD4Update() function computes a partial MD4 digest on the inlen-byte message block pointed to by input, and updates the MD4 context structure pointed to by context accordingly.
The MD4Final() function generates the final MD4 digest, using the MD4 context structure pointed to by context. The MD4 digest is written to output. After a call to MD4Final(), the state of the context structure is undefined. It must be reinitialized with MD4Init() before it can be used again.
These functions do not return a value.
The MD4 digest algorithm is not currently considered cryptographically secure. It is included in libmd(3LIB) for use by legacy protocols and systems only. It should not be used by new systems or protocols.
Example 1 Authenticate a message found in multiple buffers
The following is a sample function that must authenticate a message that is found in multiple buffers. The calling function provides an authentication buffer that will contain the result of the MD4 digest.
#include <sys/types.h> #include <sys/uio.h> #include <md4.h> int AuthenticateMsg(unsigned char *auth_buffer, struct iovec *messageIov, unsigned int num_buffers) { MD4_CTX ctx; unsigned int i; MD4Init(&ctx); for(i=0; i<num_buffers; i++) { MD4Update(&ctx, messageIov->iov_base, messageIov->iov_len); messageIov += sizeof(struct iovec); } MD4Final(auth_buffer, &ctx); return 0; }
See attributes(5) for descriptions of the following attributes:
|
RFC 1320