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

Macros

#define TAG   WINPR_TAG("crypto.cipher")
 

Functions

static WINPR_RC4_CTXwinpr_RC4_New_Internal (const BYTE *key, size_t keylen, BOOL override_fips)
 
WINPR_RC4_CTXwinpr_RC4_New_Allow_FIPS (const BYTE *key, size_t keylen)
 
WINPR_RC4_CTXwinpr_RC4_New (const BYTE *key, size_t keylen)
 
BOOL winpr_RC4_Update (WINPR_RC4_CTX *ctx, size_t length, const BYTE *input, BYTE *output)
 
void winpr_RC4_Free (WINPR_RC4_CTX *ctx)
 
WINPR_CIPHER_CTXwinpr_Cipher_New (int cipher, int op, const BYTE *key, const BYTE *iv)
 
BOOL winpr_Cipher_Update (WINPR_CIPHER_CTX *ctx, const BYTE *input, size_t ilen, BYTE *output, size_t *olen)
 
BOOL winpr_Cipher_Final (WINPR_CIPHER_CTX *ctx, BYTE *output, size_t *olen)
 
void winpr_Cipher_Free (WINPR_CIPHER_CTX *ctx)
 
int winpr_Cipher_BytesToKey (int cipher, int md, const BYTE *salt, const BYTE *data, int datal, int count, BYTE *key, BYTE *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,
int  md,
const BYTE salt,
const BYTE data,
int  datal,
int  count,
BYTE key,
BYTE 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,
BYTE 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 caller graph for this function:

◆ winpr_Cipher_New()

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

Generic Cipher API

Here is the caller graph for this function:

◆ winpr_Cipher_Update()

BOOL winpr_Cipher_Update ( WINPR_CIPHER_CTX ctx,
const BYTE input,
size_t  ilen,
BYTE 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 caller graph for this function:

◆ winpr_RC4_New()

WINPR_RC4_CTX* winpr_RC4_New ( const BYTE 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 BYTE 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

RC4

Here is the caller graph for this function:

◆ winpr_RC4_Update()

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