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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
c7b9733a
Commit
c7b9733a
authored
27 years ago
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
Type check in f_update()
Rev: src/modules/_Crypto/md5.c:1.6 Rev: src/modules/_Crypto/sha.c:1.7
parent
2ac3726c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/modules/_Crypto/md5.c
+6
-2
6 additions, 2 deletions
src/modules/_Crypto/md5.c
src/modules/_Crypto/sha.c
+5
-1
5 additions, 1 deletion
src/modules/_Crypto/sha.c
with
11 additions
and
3 deletions
src/modules/_Crypto/md5.c
+
6
−
2
View file @
c7b9733a
/*
/*
* $Id: md5.c,v 1.
5
1997/0
8/26 08:19:16
nisse Exp $
* $Id: md5.c,v 1.
6
1997/0
9/07 19:51:57
nisse Exp $
*
*
* A pike module for getting access to some common cryptos.
* A pike module for getting access to some common cryptos.
*
*
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
#include
"interpret.h"
#include
"interpret.h"
#include
"program.h"
#include
"program.h"
#include
"error.h"
#include
"error.h"
#include
"module_support.h"
#include
"md5.h"
#include
"md5.h"
...
@@ -56,7 +57,10 @@ static void f_create(INT32 args)
...
@@ -56,7 +57,10 @@ static void f_create(INT32 args)
static
void
f_update
(
INT32
args
)
static
void
f_update
(
INT32
args
)
{
{
md5_update
(
THIS
,
(
unsigned
INT8
*
)
(
sp
-
args
)
->
u
.
string
->
str
,
(
sp
-
args
)
->
u
.
string
->
len
);
struct
pike_string
*
s
;
get_all_args
(
"_Crypto.md5->update"
,
args
,
"%S"
,
&
s
);
md5_update
(
THIS
,
(
unsigned
INT8
*
)
s
->
str
,
s
->
len
);
pop_n_elems
(
args
);
pop_n_elems
(
args
);
push_object
(
this_object
());
push_object
(
this_object
());
}
}
...
...
This diff is collapsed.
Click to expand it.
src/modules/_Crypto/sha.c
+
5
−
1
View file @
c7b9733a
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
#include
"interpret.h"
#include
"interpret.h"
#include
"program.h"
#include
"program.h"
#include
"error.h"
#include
"error.h"
#include
"module_support.h"
#include
"sha.h"
#include
"sha.h"
...
@@ -49,7 +50,10 @@ static void f_create(INT32 args)
...
@@ -49,7 +50,10 @@ static void f_create(INT32 args)
static
void
f_update
(
INT32
args
)
static
void
f_update
(
INT32
args
)
{
{
sha_update
(
THIS
,
(
unsigned
INT8
*
)
(
sp
-
args
)
->
u
.
string
->
str
,
(
sp
-
args
)
->
u
.
string
->
len
);
struct
pike_string
*
s
;
get_all_args
(
"_Crypto.sha->update"
,
args
,
"%S"
,
&
s
);
sha_update
(
THIS
,
(
unsigned
INT8
*
)
s
->
str
,
s
->
len
);
pop_n_elems
(
args
);
pop_n_elems
(
args
);
push_object
(
this_object
());
push_object
(
this_object
());
}
}
...
...
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