Sandboxie/SandboxiePlus/MiscHelpers/Common/qRC4.h

18 lines
566 B
C
Raw Normal View History

2021-10-16 16:19:51 +01:00
#pragma once
2020-06-18 16:44:29 +01:00
#include "../mischelpers_global.h"
2021-10-16 16:19:51 +01:00
typedef struct MISCHELPERS_EXPORT rc4_sbox_s
{
unsigned char state[256];
unsigned int x;
unsigned int y;
} rc4_sbox_t;
void MISCHELPERS_EXPORT rc4_init(rc4_sbox_t *rc4_sbox, const unsigned char *key_ptr, unsigned int key_len);
void MISCHELPERS_EXPORT rc4_transform(rc4_sbox_t *rc4_sbox, unsigned char *buffer_ptr, unsigned int buffer_len);
void MISCHELPERS_EXPORT rc4_init(rc4_sbox_t *rc4_sbox, const QByteArray& Key);
2020-06-18 16:44:29 +01:00
QByteArray MISCHELPERS_EXPORT rc4_transform(rc4_sbox_t *rc4_sbox, const QByteArray& Data);