Fix clang warning for

../../../trunk/libretroshare/src/ft/ftserver.cc:1230:23: warning: unused
variable 'ENCRYPTED_FT_INITIALIZATION_VECTOR_SIZE' [-Wunused-const-
variable]
static const uint32_t ENCRYPTED_FT_INITIALIZATION_VECTOR_SIZE = 12 ;
                      ^
../../../trunk/libretroshare/src/ft/ftserver.cc:1231:23: warning: unused
variable 'ENCRYPTED_FT_AUTHENTICATION_TAG_SIZE' [-Wunused-const-
variable]
static const uint32_t ENCRYPTED_FT_AUTHENTICATION_TAG_SIZE    = 16 ;
                      ^
../../../trunk/libretroshare/src/ft/ftserver.cc:1232:23: warning: unused
variable 'ENCRYPTED_FT_HEADER_SIZE' [-Wunused-const-variable]
static const uint32_t ENCRYPTED_FT_HEADER_SIZE                =  4 ;
                      ^
../../../trunk/libretroshare/src/ft/ftserver.cc:1233:23: warning: unused
variable 'ENCRYPTED_FT_EDATA_SIZE' [-Wunused-const-variable]
static const uint32_t ENCRYPTED_FT_EDATA_SIZE                 =  4 ;
                      ^
../../../trunk/libretroshare/src/ft/ftserver.cc:1235:23: warning: unused
variable 'ENCRYPTED_FT_FORMAT_AEAD_CHACHA20_POLY1305' [-Wunused-const-
variable]
static const uint8_t  ENCRYPTED_FT_FORMAT_AEAD_CHACHA20_POLY1305 = 0x01
;
                      ^
../../../trunk/libretroshare/src/ft/ftserver.cc:1236:23: warning: unused
variable 'ENCRYPTED_FT_FORMAT_AEAD_CHACHA20_SHA256' [-Wunused-const-
variable]
static const uint8_t  ENCRYPTED_FT_FORMAT_AEAD_CHACHA20_SHA256   = 0x02
;
                      ^
This commit is contained in:
Phenom 2019-02-23 17:46:39 +01:00
parent 9310be075d
commit b2c5965950

View File

@ -1227,6 +1227,7 @@ void ftServer::deriveEncryptionKey(const RsFileHash& hash, uint8_t *key)
SHA256_Final (key, &sha_ctx);
}
#ifdef USE_NEW_METHOD
static const uint32_t ENCRYPTED_FT_INITIALIZATION_VECTOR_SIZE = 12 ;
static const uint32_t ENCRYPTED_FT_AUTHENTICATION_TAG_SIZE = 16 ;
static const uint32_t ENCRYPTED_FT_HEADER_SIZE = 4 ;
@ -1234,7 +1235,7 @@ static const uint32_t ENCRYPTED_FT_EDATA_SIZE = 4 ;
static const uint8_t ENCRYPTED_FT_FORMAT_AEAD_CHACHA20_POLY1305 = 0x01 ;
static const uint8_t ENCRYPTED_FT_FORMAT_AEAD_CHACHA20_SHA256 = 0x02 ;
#endif //USE_NEW_METHOD
bool ftServer::encryptItem(RsTurtleGenericTunnelItem *clear_item,const RsFileHash& hash,RsTurtleGenericDataItem *& encrypted_item)
{