rsa keys base64 encoding/decoding

This commit is contained in:
2025-09-29 10:26:45 +05:00
parent 4fda6ae9e8
commit f933d30863
8 changed files with 148 additions and 139 deletions

View File

@@ -12,8 +12,8 @@ typedef struct ClientCredential {
br_rsa_public_key pk;
EncryptorRSA rsa_enc;
DecryptorRSA rsa_dec;
EncryptorAES aes_enc;
DecryptorAES aes_dec;
EncryptorAES user_data_aes_enc;
DecryptorAES user_data_aes_dec;
} ClientCredential;
Result(ClientCredential*) ClientCredential_create(str username, str password);
@@ -23,10 +23,11 @@ typedef struct ServerConnection {
EndpointIPv4 server_end;
Socket system_socket;
Socket content_socket;
br_rsa_public_key server_pk;
EncryptorRSA rsa_enc;
EncryptorAES session_aes_enc;
DecryptorAES session_aes_dec;
} ServerConnection;
Result(ServerConnection*) ServerConnection_open(ClientCredential* client_credential, EndpointIPv4 server_end, str server_key);
void ServerConnection_close(ServerConnection* conn);
Result(ServerConnection*) ServerConnection_open(ClientCredential* client_credential, cstr server_link_cstr);
void ServerConnection_close(ServerConnection* conn);