Skip to content

Commit 2427b6c

Browse files
authored
Update README.md
1 parent 8b31386 commit 2427b6c

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

README.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,16 @@
1-
# RSA via OpenSSL libeay32
1+
# RSA via OpenSSL libeay32 on Delphi / RAD Studio / Embarcadero
22
Реализация шифрования/дешифрование строки алгоритмом RSA через библиотеку [openssl](https://www.openssl.org/) с указанием файлов секретного и публичного ключа в формате PEM.
33

44
При ключе 1024 бит длина строки при **RSA_PKCS1_PADDING** = 117 байт, при **RSA_NO_PADDING** максимальная длина строки = 128 байт
55
При увеличении битности ключа увеличивается длина строки для шифрования.
66

7+
Текущая версия исправлена и корректно работает после компиляции в EXE версииях и выше
78

8-
Для компиляции в **XE** необходимо поменять типы у входящих параметров
99

10-
####Delphi7:
11-
```delphi
12-
function LoadPrivateKey(KeyFile: string): pEVP_PKEY;
13-
function LoadPublicKey(KeyFile: string): pEVP_PKEY;
14-
```
15-
####XE:
16-
```delphi
17-
function LoadPrivateKey(KeyFile: AnsiString): pEVP_PKEY;
18-
function LoadPublicKey(KeyFile: AnsiString): pEVP_PKEY;
19-
```
10+
Implementation of encryption / decryption of a string using the RSA algorithm through the openssl library, specifying the secret and public key files in PEM format.
11+
12+
With the 1024 bit key, the string length with **RSA_PKCS1_PADDING** = 117 bytes, with **RSA_NO_PADDING**, the maximum string length = 128 bytes. Increasing the key bit increases the encryption string length.
13+
The current version has been fixed and works correctly after compilation in XE versions and higher
2014

2115
####Автор
2216
Иван Лодяной (ddlencemc@gmail.com)

0 commit comments

Comments
 (0)