65 lines
1.6 KiB
HTML
65 lines
1.6 KiB
HTML
<HTML>
|
|
<HEAD>
|
|
<TITLE>Source: krc2.h</TITLE>
|
|
<META NAME="Generator" CONTENT="KDOC ">
|
|
</HEAD>
|
|
<BODY bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000099" alink= "#ffffff">
|
|
<TABLE WIDTH="100%" BORDER="0">
|
|
<TR>
|
|
<TD>
|
|
<TABLE BORDER="0">
|
|
<TR><TD valign="top" align="left" cellspacing="10">
|
|
<h1>Source: krc2.h</h1>
|
|
</TD>
|
|
<TD valign="top" align="right" colspan="1"></TD></TR>
|
|
</TABLE>
|
|
<HR>
|
|
<TABLE BORDER="0">
|
|
|
|
</TABLE>
|
|
</TD>
|
|
<TD align="right"><TABLE BORDER="0"><TR><TD><small><A HREF="index-long.html">Annotated List</small></TD></TR>
|
|
<TR><TD><small><A HREF="header-list.html">Files</small></TD></TR>
|
|
<TR><TD><small><A HREF="all-globals.html">Globals</small></TD></TR>
|
|
<TR><TD><small><A HREF="hier.html">Hierarchy</small></TD></TR>
|
|
<TR><TD><small><A HREF="index.html">Index</small></TD></TR>
|
|
</TABLE></TD></TR></TABLE>
|
|
<pre>
|
|
#ifndef _KRC2_H_
|
|
#define _KRC2_H_
|
|
|
|
/* Header file for rc2 implementation by Matthew Palmer <mjp16@uow.edu.au> */
|
|
|
|
class Krc2
|
|
{
|
|
public:
|
|
Krc2();
|
|
~Krc2();
|
|
|
|
/* Externally worked functions */
|
|
void rc2_expandkey(char key[], int length, int ekl);
|
|
void rc2_encrypt(unsigned short *input);
|
|
void rc2_decrypt(unsigned short *input);
|
|
|
|
private:
|
|
/* The internals */
|
|
void _rc2_mix(unsigned short *input);
|
|
void _rc2_mash(unsigned short *input);
|
|
void _rc2_rmix(unsigned short *input);
|
|
void _rc2_rmash(unsigned short *input);
|
|
int _rc2_pow(int base, int exponent);
|
|
unsigned short _rc2_ror(unsigned short input, int places);
|
|
unsigned short _rc2_rol(unsigned short input, int places);
|
|
|
|
};
|
|
#endif // _KRC2_H_
|
|
|
|
|
|
|
|
</pre>
|
|
<HR>
|
|
<table>
|
|
<tr><td><small>Generated by: tengel@bugsy on Thu Nov 18 10:33:52 199.</small></td></tr>
|
|
</table>
|
|
</BODY>
|
|
</HTML>
|