security/nss/lib/freebl/cts.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/nss/lib/freebl/cts.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,33 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#ifndef CTS_H
     1.9 +#define CTS_H 1
    1.10 +
    1.11 +#include "blapii.h"
    1.12 +
    1.13 +typedef struct CTSContextStr CTSContext;
    1.14 +
    1.15 +/*
    1.16 + * The context argument is the inner cipher context to use with cipher. The
    1.17 + * CTSContext does not own context. context needs to remain valid for as long
    1.18 + * as the CTSContext is valid.
    1.19 + *
    1.20 + * The cipher argument is a block cipher in the CBC mode.
    1.21 + */
    1.22 +CTSContext *CTS_CreateContext(void *context, freeblCipherFunc cipher,
    1.23 +			const unsigned char *iv, unsigned int blocksize);
    1.24 +
    1.25 +void CTS_DestroyContext(CTSContext *cts, PRBool freeit);
    1.26 +
    1.27 +SECStatus CTS_EncryptUpdate(CTSContext *cts, unsigned char *outbuf,
    1.28 +			unsigned int *outlen, unsigned int maxout,
    1.29 +			const unsigned char *inbuf, unsigned int inlen,
    1.30 +			unsigned int blocksize);
    1.31 +SECStatus CTS_DecryptUpdate(CTSContext *cts, unsigned char *outbuf,
    1.32 +			unsigned int *outlen, unsigned int maxout,
    1.33 +			const unsigned char *inbuf, unsigned int inlen,
    1.34 +			unsigned int blocksize);
    1.35 +
    1.36 +#endif

mercurial