Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
38bc355d
Commit
38bc355d
authored
25 years ago
by
Henrik (Grubba) Grubbström
Browse files
Options
Downloads
Patches
Plain Diff
First version -- only dummy functions.
Rev: src/modules/_Crypto/rsa.c:1.1
parent
fca5b2c0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitattributes
+1
-0
1 addition, 0 deletions
.gitattributes
src/modules/_Crypto/rsa.c
+228
-0
228 additions, 0 deletions
src/modules/_Crypto/rsa.c
with
229 additions
and
0 deletions
.gitattributes
+
1
−
0
View file @
38bc355d
...
@@ -386,6 +386,7 @@ testfont binary
...
@@ -386,6 +386,7 @@ testfont binary
/src/modules/_Crypto/nt.c foreign_ident
/src/modules/_Crypto/nt.c foreign_ident
/src/modules/_Crypto/pipe.c foreign_ident
/src/modules/_Crypto/pipe.c foreign_ident
/src/modules/_Crypto/rc4.c foreign_ident
/src/modules/_Crypto/rc4.c foreign_ident
/src/modules/_Crypto/rsa.c foreign_ident
/src/modules/_Crypto/sha.c foreign_ident
/src/modules/_Crypto/sha.c foreign_ident
/src/modules/_Crypto/test_crypto.pike foreign_ident
/src/modules/_Crypto/test_crypto.pike foreign_ident
/src/modules/_Image_JPEG/Makefile.in foreign_ident
/src/modules/_Image_JPEG/Makefile.in foreign_ident
...
...
This diff is collapsed.
Click to expand it.
src/modules/_Crypto/rsa.c
0 → 100644
+
228
−
0
View file @
38bc355d
/*
* $Id: rsa.c,v 1.1 2000/01/26 19:48:26 grubba Exp $
*
* Glue to RSA BSAFE's RSA implementation.
*
* Henrik Grubbstrm 2000-01-26
*/
#include
"config.h"
#include
"global.h"
#include
"svalue.h"
#include
"program.h"
#ifdef HAVE_B_RSA_PUBLIC_KEY_TYPE
#define HAVE_RSA_LIB
#endif
/* HAVE_B_RSA_PUBLIC_KEY_TYPE */
#ifdef HAVE_RSA_LIB
#include
<bsafe.h>
RSCID
(
"$Id: rsa.c,v 1.1 2000/01/26 19:48:26 grubba Exp $"
);
void
f_set_public_key
(
INT32
args
)
{
pop_n_elems
(
args
);
push_int
(
0
);
}
void
f_set_private_key
(
INT32
args
)
{
pop_n_elems
(
args
);
push_int
(
0
);
}
void
f_query_blocksize
(
INT32
args
)
{
pop_n_elems
(
args
);
push_int
(
0
);
}
void
f_rsa_pad
(
INT32
args
)
{
pop_n_elems
(
args
);
push_int
(
0
);
}
void
f_rsa_unpad
(
INT32
args
)
{
pop_n_elems
(
args
);
push_int
(
0
);
}
void
f_raw_sign
(
INT32
args
)
{
pop_n_elems
(
args
);
push_int
(
0
);
}
void
f_raw_verify
(
INT32
args
)
{
pop_n_elems
(
args
);
push_int
(
0
);
}
void
f_sign
(
INT32
args
)
{
pop_n_elems
(
args
);
push_int
(
0
);
}
void
f_verify
(
INT32
args
)
{
pop_n_elems
(
args
);
push_int
(
0
);
}
void
f_sha_sign
(
INT32
args
)
{
pop_n_elems
(
args
);
push_int
(
0
);
}
void
f_sha_verify
(
INT32
args
)
{
pop_n_elems
(
args
);
push_int
(
0
);
}
void
f_generate_key
(
INT32
args
)
{
pop_n_elems
(
args
);
push_int
(
0
);
}
void
f_encrypt
(
INT32
args
)
{
pop_n_elems
(
args
);
push_int
(
0
);
}
void
f_decrypt
(
INT32
args
)
{
pop_n_elems
(
args
);
push_int
(
0
);
}
void
f_set_encrypt_key
(
INT32
args
)
{
pop_n_elems
(
args
);
push_int
(
0
);
}
void
f_set_decrypt_key
(
INT32
args
)
{
pop_n_elems
(
args
);
push_int
(
0
);
}
void
f_crypt_block
(
INT32
args
)
{
pop_n_elems
(
args
);
push_int
(
0
);
}
void
f_rsa_size
(
INT32
args
)
{
pop_n_elems
(
args
);
push_int
(
0
);
}
void
f_public_key_equal
(
INT32
args
)
{
pop_n_elems
(
args
);
push_int
(
0
);
}
#endif
/* HAVE_RSA_LIB */
/*
* Module linkage.
*/
void
pike_rsa_init
(
void
)
{
/*
* start_new_program();
*
* add_storage();
*
* add_function();
* add_function();
* ...
*
* set_init_callback();
* set_exit_callback();
*
* program = end_c_program();
* program->refs++;
*
*/
#ifdef HAVE_RSA_LIB
start_new_program
();
ADD_FUNCTION
(
"set_public_key"
,
f_set_public_key
,
tFunc
(
tObj
tObj
,
tObj
),
0
);
ADD_FUNCTION
(
"set_private_key"
,
f_set_private_key
,
tFunc
(
tObj
tOr
(
tArr
(
tObj
),
tVoid
),
tObj
),
0
);
ADD_FUNCTION
(
"query_blocksize"
,
f_query_blocksize
,
tFunc
(
tNone
,
tInt
),
0
);
ADD_FUNCTION
(
"rsa_pad"
,
f_rsa_pad
,
tFunc
(
tString
tInt
tOr
(
tMix
,
tVoid
),
tObj
),
0
);
ADD_FUNCTION
(
"rsa_unpad"
,
f_rsa_unpad
,
tFunc
(
tObj
tInt
,
tString
),
0
);
ADD_FUNCTION
(
"raw_sign"
,
f_raw_sign
,
tFunc
(
tString
,
tObj
),
0
);
ADD_FUNCTION
(
"raw_verify"
,
f_raw_verify
,
tFunc
(
tString
tObj
,
tInt
),
0
);
ADD_FUNCTION
(
"sign"
,
f_sign
,
tFunc
(
tString
tProg
tOr
(
tMix
,
tVoid
),
tObj
),
0
);
ADD_FUNCTION
(
"verify"
,
f_verify
,
tFunc
(
tString
tProg
tObj
,
tInt
),
0
);
ADD_FUNCTION
(
"sha_sign"
,
f_sha_sign
,
tFunc
(
tString
tOr
(
tMix
,
tVoid
),
tString
),
0
);
ADD_FUNCTION
(
"sha_verify"
,
f_sha_verify
,
tFunc
(
tString
tString
,
tInt
),
0
);
ADD_FUNCTION
(
"generate_key"
,
f_generate_key
,
tFunc
(
tInt
tOr
(
tFunction
,
tVoid
),
tObj
),
0
);
ADD_FUNCTION
(
"encrypt"
,
f_encrypt
,
tFunc
(
tString
tOr
(
tMix
,
tVoid
),
tString
),
0
);
ADD_FUNCTION
(
"decrypt"
,
f_decrypt
,
tFunc
(
tString
,
tString
),
0
);
ADD_FUNCTION
(
"set_encrypt_key"
,
f_set_encrypt_key
,
tFunc
(
tArr
(
tObj
),
tObj
),
0
);
ADD_FUNCTION
(
"set_decrypt_key"
,
f_set_decrypt_key
,
tFunc
(
tArr
(
tObj
),
tObj
),
0
);
ADD_FUNCTION
(
"crypt_block"
,
f_crypt_block
,
tFunc
(
tString
,
tString
),
0
);
ADD_FUNCTION
(
"rsa_size"
,
f_rsa_size
,
tFunc
(
tNone
,
tInt
),
0
);
ADD_FUNCTION
(
"public_key_equal"
,
f_public_key_equal
,
tFunc
(
tObj
,
tInt
),
0
);
end_class
(
"idea"
,
0
);
#endif
/* HAVE_RSA_LIB */
}
void
pike_rsa_exit
(
void
)
{
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment