FreeRDP
cipher.c File Reference
#include <winpr/config.h>
#include <winpr/crt.h>
#include <winpr/assert.h>
#include <winpr/crypto.h>
#include "../log.h"

Macros

#define TAG   WINPR_TAG("crypto.cipher")
 

Functions

static WINPR_RC4_CTX * winpr_RC4_New_Internal (const BYTE *key, size_t keylen, BOOL override_fips)
 
WINPR_RC4_CTX * winpr_RC4_New_Allow_FIPS (const void *key, size_t keylen)
 
WINPR_RC4_CTX * winpr_RC4_New (const void *key, size_t keylen)
 
BOOL winpr_RC4_Update (WINPR_RC4_CTX *ctx, size_t length, const void *input, void *output)
 
void winpr_RC4_Free (WINPR_RC4_CTX *ctx)
 
WINPR_CIPHER_CTXwinpr_Cipher_New (int cipher, int op, const void *key, const void *iv)
 
BOOL winpr_Cipher_SetPadding (WINPR_CIPHER_CTX *ctx, BOOL enabled)
 
BOOL winpr_Cipher_Update (WINPR_CIPHER_CTX *ctx, const void *input, size_t ilen, void *output, size_t *olen)
 
BOOL winpr_Cipher_Final (WINPR_CIPHER_CTX *ctx, void *output, size_t *olen)
 
void winpr_Cipher_Free (WINPR_CIPHER_CTX *ctx)
 
int winpr_Cipher_BytesToKey (int cipher, WINPR_MD_TYPE md, const void *salt, const void *data, size_t datal, size_t count, void *key, void *iv)
 

Macro Definition Documentation

◆ TAG

#define TAG   WINPR_TAG("crypto.cipher")

WinPR: Windows Portable Runtime

Copyright 2015 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

◆ winpr_Cipher_BytesToKey()

int winpr_Cipher_BytesToKey ( int  cipher,
WINPR_MD_TYPE  md,
const void *  salt,
const void *  data,
size_t  datal,
size_t  count,
void *  key,
void *  iv 
)

Key Generation

Key and IV generation compatible with OpenSSL EVP_BytesToKey(): https://www.openssl.org/docs/manmaster/crypto/EVP_BytesToKey.html

Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_Cipher_Final()

BOOL winpr_Cipher_Final ( WINPR_CIPHER_CTX ctx,
void *  output,
size_t *  olen 
)
Here is the caller graph for this function:

◆ winpr_Cipher_Free()

void winpr_Cipher_Free ( WINPR_CIPHER_CTX ctx)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_Cipher_New()

WINPR_CIPHER_CTX* winpr_Cipher_New ( int  cipher,
int  op,
const void *  key,
const void *  iv 
)

Generic Cipher API

Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_Cipher_SetPadding()

BOOL winpr_Cipher_SetPadding ( WINPR_CIPHER_CTX ctx,
BOOL  enabled 
)

◆ winpr_Cipher_Update()

BOOL winpr_Cipher_Update ( WINPR_CIPHER_CTX ctx,
const void *  input,
size_t  ilen,
void *  output,
size_t *  olen 
)
Here is the caller graph for this function:

◆ winpr_RC4_Free()

void winpr_RC4_Free ( WINPR_RC4_CTX *  ctx)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_RC4_New()

WINPR_RC4_CTX* winpr_RC4_New ( const void *  key,
size_t  keylen 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_RC4_New_Allow_FIPS()

WINPR_RC4_CTX* winpr_RC4_New_Allow_FIPS ( const void *  key,
size_t  keylen 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_RC4_New_Internal()

static WINPR_RC4_CTX* winpr_RC4_New_Internal ( const BYTE key,
size_t  keylen,
BOOL  override_fips 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_RC4_Update()

BOOL winpr_RC4_Update ( WINPR_RC4_CTX *  ctx,
size_t  length,
const void *  input,
void *  output 
)
Here is the call graph for this function:
Here is the caller graph for this function: