Skip to main content
  • Home
  • login
  • Browse the archive

    swh mirror partner logo
swh logo
SoftwareHeritage
Software
Heritage
Mirror
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision 97853bd5c1f0e82bfe1eeaf0b57fbe4f98488f2c authored by Bodo Möller on 08 March 2000, 20:20:15 UTC, committed by Bodo Möller on 08 March 2000, 20:20:15 UTC
Clarification.
1 parent c612520
  • Files
  • Changes
  • 703a396
  • /
  • perl
  • /
  • openssl_digest.xs
Raw File
Cook and download a directory from the Software Heritage Vault

You have requested the cooking of the directory with identifier None into a standard tar.gz archive.

Are you sure you want to continue ?

Download a directory from the Software Heritage Vault

You have requested the download of the directory with identifier None as a standard tar.gz archive.

Are you sure you want to continue ?

Cook and download a revision from the Software Heritage Vault

You have requested the cooking of the history heading to revision with identifier swh:1:rev:97853bd5c1f0e82bfe1eeaf0b57fbe4f98488f2c into a bare git archive.

Are you sure you want to continue ?

Download a revision from the Software Heritage Vault

You have requested the download of the history heading to revision with identifier swh:1:rev:97853bd5c1f0e82bfe1eeaf0b57fbe4f98488f2c as a bare git archive.

Are you sure you want to continue ?

Invalid Email !

The provided email is not well-formed.

Download link has expired

The requested archive is no longer available for download from the Software Heritage Vault.

Do you want to cook it again ?

Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • content
revision badge
swh:1:rev:97853bd5c1f0e82bfe1eeaf0b57fbe4f98488f2c
content badge Iframe embedding
swh:1:cnt:6cd3018e9f210b1308b2d3f4940568c78ae2ab57
openssl_digest.xs

#include "openssl.h"

int boot_digest()
	{
	SSLeay_add_all_digests();
	return(1);
	}

MODULE =  OpenSSL::MD	PACKAGE = OpenSSL::MD	PREFIX = p5_EVP_MD_

PROTOTYPES: ENABLE
VERSIONCHECK: DISABLE

# OpenSSL::MD::new(name) name= md2, md5, sha, sha1, or mdc2
#	md->name() - returns the name
#	md->init() - reinitalises the digest
#	md->update(data) - adds more data to digest
#	digest=md->final() - returns digest
#

void
p5_EVP_MD_new(...)
	PREINIT:
		EVP_MD_CTX *ctx;
		const EVP_MD *md;
		char *name;
	PPCODE:
		if ((items == 1) && SvPOK(ST(0)))
			name=SvPV(ST(0),na);
		else if ((items == 2) && SvPOK(ST(1)))
			name=SvPV(ST(1),na);
		else
			croak("Usage: OpenSSL::MD::new(type)");
		PUSHs(sv_newmortal());
		md=EVP_get_digestbyname(name);
		if (md != NULL)
			{
			ctx=malloc(sizeof(EVP_MD_CTX));
			EVP_DigestInit(ctx,md);
			sv_setref_pv(ST(0), "OpenSSL::MD", (void*)ctx);
			}

datum
p5_EVP_MD_name(ctx)
	EVP_MD_CTX *ctx
	CODE:
		RETVAL.dptr=OBJ_nid2ln(EVP_MD_type(EVP_MD_CTX_type(ctx)));
		RETVAL.dsize=strlen(RETVAL.dptr);
	OUTPUT:
		RETVAL
	
void
p5_EVP_MD_init(ctx)
	EVP_MD_CTX *ctx
	CODE:
		EVP_DigestInit(ctx,EVP_MD_CTX_type(ctx));

void
p5_EVP_MD_update(ctx, in)
	EVP_MD_CTX *ctx
	datum in
	CODE:
		EVP_DigestUpdate(ctx,in.dptr,in.dsize);

datum
p5_EVP_MD_final(ctx)
	EVP_MD_CTX *ctx
	PREINIT:
		char md[EVP_MAX_MD_SIZE];
		int len;
	CODE:
		EVP_DigestFinal(ctx,md,&len);
		RETVAL.dptr=md;
		RETVAL.dsize=len;
	OUTPUT:
		RETVAL

void
p5_EVP_MD_DESTROY(ctx)
	EVP_MD_CTX *ctx
	CODE:
	free((char *)ctx);

The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

ENEA — Copyright (C), ENEA. License: GNU AGPLv3+.
Legal notes  ::  JavaScript license information ::  Web API

back to top