FreeRDP
|
#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_CTX * | winpr_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) |
#define TAG WINPR_TAG("crypto.cipher") |
WinPR: Windows Portable Runtime
Copyright 2015 Marc-Andre Moreau marca ndre .more au@g mail. 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.
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
BOOL winpr_Cipher_Final | ( | WINPR_CIPHER_CTX * | ctx, |
void * | output, | ||
size_t * | olen | ||
) |
void winpr_Cipher_Free | ( | WINPR_CIPHER_CTX * | ctx | ) |
WINPR_CIPHER_CTX* winpr_Cipher_New | ( | int | cipher, |
int | op, | ||
const void * | key, | ||
const void * | iv | ||
) |
Generic Cipher API
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 | ||
) |
void winpr_RC4_Free | ( | WINPR_RC4_CTX * | ctx | ) |
WINPR_RC4_CTX* winpr_RC4_New | ( | const void * | key, |
size_t | keylen | ||
) |
WINPR_RC4_CTX* winpr_RC4_New_Allow_FIPS | ( | const void * | key, |
size_t | keylen | ||
) |
|
static |
BOOL winpr_RC4_Update | ( | WINPR_RC4_CTX * | ctx, |
size_t | length, | ||
const void * | input, | ||
void * | output | ||
) |