Add ruby-cast_256, a Ruby extension library which implements CAST-256

encryption.
This commit is contained in:
Akinori MUSHA 2002-10-08 10:13:51 +00:00
parent a1b83812aa
commit 7bd278072d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=67619
7 changed files with 85 additions and 0 deletions

View File

@ -239,6 +239,7 @@
SUBDIR += ruby-acl
SUBDIR += ruby-aes
SUBDIR += ruby-blowfish
SUBDIR += ruby-cast_256
SUBDIR += ruby-hmac
SUBDIR += ruby-mcrypt
SUBDIR += ruby-openssl

View File

@ -0,0 +1,53 @@
# New ports collection makefile for: Ruby/CAST-256
# Date created: 8 October 2002
# Whom: Akinori MUSHA aka knu <knu@idaemons.org>
#
# $FreeBSD$
#
PORTNAME= cast_256
PORTVERSION= 1.0
CATEGORIES= security ruby
MASTER_SITES= http://www.s-direktnet.de/homepages/neumann/Data/Michael/Kryptologie/Cast/
PKGNAMEPREFIX= ${RUBY_PKGNAMEPREFIX}
DISTNAME= ruby_${PORTNAME}
DIST_SUBDIR= ruby
MAINTAINER= knu@FreeBSD.org
RESTRICTED= "Crypto; export-controlled"
USE_ZIP= yes
USE_RUBY= yes
USE_RUBY_EXTCONF= yes
WRKSRC= ${WRKDIR}/${PORTNAME}/gcc
INSTALL_TARGET= site-install
DOCS= ../readme.txt
EXAMPLES= ../test.rb
post-extract:
${ECHO_CMD} >> ${WRKSRC}/cast_256.hpp
( \
${ECHO_CMD} 'require "mkmf"'; \
${ECHO_CMD} 'have_library("stdc++")'; \
${ECHO_CMD} 'create_makefile("rcast_256")'; \
) > ${WRKSRC}/${RUBY_EXTCONF}
${MKDIR} ${WRKSRC}/lib
${MV} ${WRKSRC}/../cast_256.rb ${WRKSRC}/lib/
post-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${RUBY_MODEXAMPLESDIR}
.for f in ${EXAMPLES}
${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_MODEXAMPLESDIR}/
.endfor
${MKDIR} ${RUBY_MODDOCDIR}
.for f in ${DOCS}
${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_MODDOCDIR}/
.endfor
.endif
.include <bsd.port.mk>

View File

@ -0,0 +1 @@
MD5 (ruby/ruby_cast_256.zip) = 02771bfdd77409b0c231c7199a969004

View File

@ -0,0 +1,18 @@
--- rcast_256.cc.orig Sun May 23 15:26:24 1999
+++ rcast_256.cc Tue Oct 8 18:46:29 2002
@@ -107,12 +107,12 @@
}
-extern "C" EXTERN void Init_rcast_256(void){
+extern "C" void Init_rcast_256(void){
VALUE mCAST_256 = rb_define_module("RCAST_256");
rb_define_const(mCAST_256, "ENCRYPT", INT2FIX(ENCRYPT) );
rb_define_const(mCAST_256, "DECRYPT", INT2FIX(DECRYPT) );
- rb_define_module_function(mCAST_256, "set_key",(unsigned long (__cdecl *)(void)) set_key ,1);
- rb_define_module_function(mCAST_256, "crypt_block",(unsigned long (__cdecl *)(void)) crypt_block ,3);
+ rb_define_module_function(mCAST_256, "set_key",(unsigned long (__cdecl *)(...)) set_key ,1);
+ rb_define_module_function(mCAST_256, "crypt_block",(unsigned long (__cdecl *)(...)) crypt_block ,3);
}

View File

@ -0,0 +1 @@
A Ruby extension library which implements CAST-256 encryption

View File

@ -0,0 +1,5 @@
This is an implementation of the CAST-256 encryption algorithm for
Ruby.
Author: Michael Neumann <neumann@s-direktnet.de>
WWW: http://www.s-direktnet.de/homepages/neumann/crypt/en/

View File

@ -0,0 +1,6 @@
%%RUBY_SITEARCHLIBDIR%%/rcast_256.so
%%RUBY_SITELIBDIR%%/cast_256.rb
%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/test.rb
%%PORTDOCS%%@dirrm %%RUBY_MODEXAMPLESDIR%%
%%PORTDOCS%%%%RUBY_MODDOCDIR%%/readme.txt
%%PORTDOCS%%@dirrm %%RUBY_MODDOCDIR%%