2
* arcfive.c - stubs for RC5 - NOT a working implementation!
4
* The contents of this file are subject to the Mozilla Public
5
* License Version 1.1 (the "License"); you may not use this file
6
* except in compliance with the License. You may obtain a copy of
7
* the License at http://www.mozilla.org/MPL/
9
* Software distributed under the License is distributed on an "AS
10
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
11
* implied. See the License for the specific language governing
12
* rights and limitations under the License.
14
* The Original Code is the Netscape security libraries.
16
* The Initial Developer of the Original Code is Netscape
17
* Communications Corporation. Portions created by Netscape are
18
* Copyright (C) 2000 Netscape Communications Corporation. All
23
* Alternatively, the contents of this file may be used under the
24
* terms of the GNU General Public License Version 2 or later (the
25
* "GPL"), in which case the provisions of the GPL are applicable
26
* instead of those above. If you wish to allow use of your
27
* version of this file only under the terms of the GPL and not to
28
* allow others to use your version of this file under the MPL,
29
* indicate your decision by deleting the provisions above and
30
* replace them with the notice and other provisions required by
31
* the GPL. If you do not delete the provisions above, a recipient
32
* may use your version of this file under either the MPL or the
35
* $Id: arcfive.c,v 1.3 2002/11/16 06:09:57 nelsonb%netscape.com Exp $
41
/******************************************/
43
** RC5 symmetric block cypher -- 64-bit block size
47
** Create a new RC5 context suitable for RC5 encryption/decryption.
49
** "len" the number of bytes of key data
50
** "iv" is the CBC initialization vector (if mode is NSS_RC5_CBC)
51
** "mode" one of NSS_RC5 or NSS_RC5_CBC
53
** When mode is set to NSS_RC5_CBC the RC5 cipher is run in "cipher block
57
RC5_CreateContext(const SECItem *key, unsigned int rounds,
58
unsigned int wordSize, const unsigned char *iv, int mode)
60
PORT_SetError(PR_NOT_IMPLEMENTED_ERROR);
65
** Destroy an RC5 encryption/decryption context.
67
** "freeit" if PR_TRUE then free the object as well as its sub-objects
70
RC5_DestroyContext(RC5Context *cx, PRBool freeit)
72
PORT_SetError(PR_NOT_IMPLEMENTED_ERROR);
76
** Perform RC5 encryption.
78
** "output" the output buffer to store the encrypted data.
79
** "outputLen" how much data is stored in "output". Set by the routine
80
** after some data is stored in output.
81
** "maxOutputLen" the maximum amount of data that can ever be
83
** "input" the input data
84
** "inputLen" the amount of input data
87
RC5_Encrypt(RC5Context *cx, unsigned char *output, unsigned int *outputLen,
88
unsigned int maxOutputLen,
89
const unsigned char *input, unsigned int inputLen)
91
PORT_SetError(PR_NOT_IMPLEMENTED_ERROR);
96
** Perform RC5 decryption.
98
** "output" the output buffer to store the decrypted data.
99
** "outputLen" how much data is stored in "output". Set by the routine
100
** after some data is stored in output.
101
** "maxOutputLen" the maximum amount of data that can ever be
102
** stored in "output"
103
** "input" the input data
104
** "inputLen" the amount of input data
107
RC5_Decrypt(RC5Context *cx, unsigned char *output, unsigned int *outputLen,
108
unsigned int maxOutputLen,
109
const unsigned char *input, unsigned int inputLen)
111
PORT_SetError(PR_NOT_IMPLEMENTED_ERROR);