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
a9981a23
Commit
a9981a23
authored
Dec 15, 2003
by
Martin Nilsson
Browse files
Options
Downloads
Patches
Plain Diff
Improved CBC/Proxy name methods. More documentation.
Rev: src/post_modules/Nettle/nettle.cmod:1.26
parent
725967b4
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/post_modules/Nettle/nettle.cmod
+18
-4
18 additions, 4 deletions
src/post_modules/Nettle/nettle.cmod
with
18 additions
and
4 deletions
src/post_modules/Nettle/nettle.cmod
+
18
−
4
View file @
a9981a23
/* nettle.cmod -*- c -*- */
/* nettle.cmod -*- c -*- */
#include
"global.h"
#include
"global.h"
RCSID
(
"$Id: nettle.cmod,v 1.2
5
2003/12/1
4
00:0
8:57
nilsson Exp $"
);
RCSID
(
"$Id: nettle.cmod,v 1.2
6
2003/12/1
5
00:0
0:35
nilsson Exp $"
);
#include
"interpret.h"
#include
"interpret.h"
#include
"svalue.h"
#include
"svalue.h"
/* For this_object() */
/* For this_object() */
...
@@ -392,10 +392,14 @@ PIKECLASS CBC
...
@@ -392,10 +392,14 @@ PIKECLASS CBC
}
}
/*! @decl string name()
/*! @decl string name()
*! Returns the string @expr{"CBC"@}.
*! Returns the string @expr{"CBC(x)"@} where x is the
*! encapsulated algorithm.
*/
*/
PIKEFUN
string
name
()
{
PIKEFUN
string
name
()
{
push_constant_text
(
"CBC"
);
push_constant_text
(
"CBC("
);
safe_apply
(
THIS
->
object
,
"name"
,
0
);
push_constant_text
(
")"
);
f_add
(
3
);
}
}
/*! @decl int block_size()
/*! @decl int block_size()
...
@@ -511,6 +515,11 @@ PIKECLASS Proxy {
...
@@ -511,6 +515,11 @@ PIKECLASS Proxy {
}
}
/*! @decl void create(program|object|function cipher, mixed ... args)
/*! @decl void create(program|object|function cipher, mixed ... args)
*! Initialize the Proxy wrapper with a cipher algorithm. If it is a
*! program, an object will be instantiated with @[args] as arguments.
*! If it is an object that doesn't conform to the cipher API, but has
*! an @[LFUN::`()], that LFUN will be called. If it is a function,
*! that function will be called with @[args] as arguments.
*/
*/
PIKEFUN
void
create
(
program
|
object
|
function
cipher
,
mixed
...
more
)
{
PIKEFUN
void
create
(
program
|
object
|
function
cipher
,
mixed
...
more
)
{
THIS
->
object
=
make_cipher_object
(
args
);
THIS
->
object
=
make_cipher_object
(
args
);
...
@@ -532,9 +541,14 @@ PIKECLASS Proxy {
...
@@ -532,9 +541,14 @@ PIKECLASS Proxy {
}
}
/*! @decl string name()
/*! @decl string name()
*! Returns the string @expr{"CBC(x)"@} where x is the
*! encapsulated algorithm.
*/
*/
PIKEFUN
string
name
()
{
PIKEFUN
string
name
()
{
push_constant_text
(
"Proxy"
);
push_constant_text
(
"Proxy("
);
safe_apply
(
THIS
->
object
,
"name"
,
0
);
push_constant_text
(
")"
);
f_add
(
3
);
}
}
/*! @decl int block_size()
/*! @decl int block_size()
...
...
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