Пожалуйста, обратите внимание, что пользователь заблокирован
Source:
hxxps://cr.yp.to/snuffle.html
usage:
Remarks:
calling "ECRYPT_encrypt_bytes" should be done when encrypting fixed-length messages. For encrypting chunks, use the ECRYPT_encrypt_blocks macro, like in the example, because ECRYPT_encrypt_bytes can be called only once for key. Since the code is well-documented, i suggest to read "ecrypt-sync.h" for further informations.
Download:
hxxps://anonfiles.com/36H0f310pe/salsa20_rar
hxxps://cr.yp.to/snuffle.html
usage:
Код:
#include "ecrypt-synch.h"
int main(){
ECRYPT_ctx ctx;
unsigned char plaintext[1024] = "Test";
unsigned char receiver[1024];
u8 key[ECRYPT_MAXKEYSIZE / 8], IV[ECRYPT_MAXIVSIZE/8], ciphertext[1024], * result;
memset(key, 0, ECRYPT_MAXKEYSIZE / 8);
memset(key, 0, ECRYPT_MAXIVSIZE / 8);
ECRYPT_init();
ECRYPT_keysetup(&ctx, key, ECRYPT_MAXKEYSIZE, ECRYPT_MAXIVSIZE);
ECRYPT_ivsetup(&ctx, IV);
ECRYPT_encrypt_blocks(&ctx, plaintext, ciphertext, 16);
ECRYPT_ivsetup(&ctx, IV);
ECRYPT_decrypt_blocks(&ctx, ciphertext, receiver, 16);
return 0;
}
Remarks:
calling "ECRYPT_encrypt_bytes" should be done when encrypting fixed-length messages. For encrypting chunks, use the ECRYPT_encrypt_blocks macro, like in the example, because ECRYPT_encrypt_bytes can be called only once for key. Since the code is well-documented, i suggest to read "ecrypt-sync.h" for further informations.
Download:
hxxps://anonfiles.com/36H0f310pe/salsa20_rar
Последнее редактирование: