diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-09-30 11:32:30 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-09-30 11:32:30 +0000 |
commit | 45b5c1f11144bc14fae34c991ae9db89d6ba8913 (patch) | |
tree | f4a2fbe70573e0d9bb56d4ccb8be29fcf0c50c55 /src/fs/fs_download.c | |
parent | 05ef63d9f8cf65561b7ed2234efdc80e3fb40bd0 (diff) | |
download | gnunet-45b5c1f11144bc14fae34c991ae9db89d6ba8913.tar.gz gnunet-45b5c1f11144bc14fae34c991ae9db89d6ba8913.zip |
-rename files/symbols from _aes to _symmetric
Diffstat (limited to 'src/fs/fs_download.c')
-rw-r--r-- | src/fs/fs_download.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/fs/fs_download.c b/src/fs/fs_download.c index 2b67dc31e..282198cd3 100644 --- a/src/fs/fs_download.c +++ b/src/fs/fs_download.c | |||
@@ -234,12 +234,12 @@ encrypt_existing_match (struct GNUNET_FS_DownloadContext *dc, | |||
234 | { | 234 | { |
235 | struct ProcessResultClosure prc; | 235 | struct ProcessResultClosure prc; |
236 | char enc[len]; | 236 | char enc[len]; |
237 | struct GNUNET_CRYPTO_AesSessionKey sk; | 237 | struct GNUNET_CRYPTO_SymmetricSessionKey sk; |
238 | struct GNUNET_CRYPTO_AesInitializationVector iv; | 238 | struct GNUNET_CRYPTO_SymmetricInitializationVector iv; |
239 | struct GNUNET_HashCode query; | 239 | struct GNUNET_HashCode query; |
240 | 240 | ||
241 | GNUNET_CRYPTO_hash_to_aes_key (&chk->key, &sk, &iv); | 241 | GNUNET_CRYPTO_hash_to_aes_key (&chk->key, &sk, &iv); |
242 | if (-1 == GNUNET_CRYPTO_aes_encrypt (block, len, &sk, &iv, enc)) | 242 | if (-1 == GNUNET_CRYPTO_symmetric_encrypt (block, len, &sk, &iv, enc)) |
243 | { | 243 | { |
244 | GNUNET_break (0); | 244 | GNUNET_break (0); |
245 | return GNUNET_SYSERR; | 245 | return GNUNET_SYSERR; |
@@ -434,8 +434,8 @@ try_match_block (struct GNUNET_FS_DownloadContext *dc, | |||
434 | char enc[DBLOCK_SIZE]; | 434 | char enc[DBLOCK_SIZE]; |
435 | struct ContentHashKey chks[CHK_PER_INODE]; | 435 | struct ContentHashKey chks[CHK_PER_INODE]; |
436 | struct ContentHashKey in_chk; | 436 | struct ContentHashKey in_chk; |
437 | struct GNUNET_CRYPTO_AesSessionKey sk; | 437 | struct GNUNET_CRYPTO_SymmetricSessionKey sk; |
438 | struct GNUNET_CRYPTO_AesInitializationVector iv; | 438 | struct GNUNET_CRYPTO_SymmetricInitializationVector iv; |
439 | size_t dlen; | 439 | size_t dlen; |
440 | struct DownloadRequest *drc; | 440 | struct DownloadRequest *drc; |
441 | struct GNUNET_DISK_FileHandle *fh; | 441 | struct GNUNET_DISK_FileHandle *fh; |
@@ -473,7 +473,7 @@ try_match_block (struct GNUNET_FS_DownloadContext *dc, | |||
473 | } | 473 | } |
474 | GNUNET_CRYPTO_hash (&data[dr->offset], dlen, &in_chk.key); | 474 | GNUNET_CRYPTO_hash (&data[dr->offset], dlen, &in_chk.key); |
475 | GNUNET_CRYPTO_hash_to_aes_key (&in_chk.key, &sk, &iv); | 475 | GNUNET_CRYPTO_hash_to_aes_key (&in_chk.key, &sk, &iv); |
476 | if (-1 == GNUNET_CRYPTO_aes_encrypt (&data[dr->offset], dlen, &sk, &iv, enc)) | 476 | if (-1 == GNUNET_CRYPTO_symmetric_encrypt (&data[dr->offset], dlen, &sk, &iv, enc)) |
477 | { | 477 | { |
478 | GNUNET_break (0); | 478 | GNUNET_break (0); |
479 | return; | 479 | return; |
@@ -945,8 +945,8 @@ process_result_with_request (void *cls, const struct GNUNET_HashCode * key, | |||
945 | struct GNUNET_FS_DownloadContext *dc = prc->dc; | 945 | struct GNUNET_FS_DownloadContext *dc = prc->dc; |
946 | struct DownloadRequest *drc; | 946 | struct DownloadRequest *drc; |
947 | struct GNUNET_DISK_FileHandle *fh = NULL; | 947 | struct GNUNET_DISK_FileHandle *fh = NULL; |
948 | struct GNUNET_CRYPTO_AesSessionKey skey; | 948 | struct GNUNET_CRYPTO_SymmetricSessionKey skey; |
949 | struct GNUNET_CRYPTO_AesInitializationVector iv; | 949 | struct GNUNET_CRYPTO_SymmetricInitializationVector iv; |
950 | char pt[prc->size]; | 950 | char pt[prc->size]; |
951 | struct GNUNET_FS_ProgressInfo pi; | 951 | struct GNUNET_FS_ProgressInfo pi; |
952 | uint64_t off; | 952 | uint64_t off; |
@@ -991,7 +991,7 @@ process_result_with_request (void *cls, const struct GNUNET_HashCode * key, | |||
991 | } | 991 | } |
992 | 992 | ||
993 | GNUNET_CRYPTO_hash_to_aes_key (&dr->chk.key, &skey, &iv); | 993 | GNUNET_CRYPTO_hash_to_aes_key (&dr->chk.key, &skey, &iv); |
994 | if (-1 == GNUNET_CRYPTO_aes_decrypt (prc->data, prc->size, &skey, &iv, pt)) | 994 | if (-1 == GNUNET_CRYPTO_symmetric_decrypt (prc->data, prc->size, &skey, &iv, pt)) |
995 | { | 995 | { |
996 | GNUNET_break (0); | 996 | GNUNET_break (0); |
997 | dc->emsg = GNUNET_strdup (_("internal error decrypting content")); | 997 | dc->emsg = GNUNET_strdup (_("internal error decrypting content")); |