mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 22:47:03 +00:00
crypto light refactoring.
using volatile f/p guaranting assembly will generate call* instruction on memset for secure buffer zeroing. usage in sha1 api as well.
This commit is contained in:
parent
c646476ca8
commit
1f93fc902b
5 changed files with 13 additions and 19 deletions
|
|
@ -136,3 +136,9 @@ char* extract_file_name(const char* file_path, char real_file_name[CRYPTO_MAX_PA
|
|||
strcpy_trunc(r, v);
|
||||
return real_file_name;
|
||||
}
|
||||
|
||||
void mbedtls_zeroize(void *v, size_t n)
|
||||
{
|
||||
static void *(*const volatile unop_memset)(void *, int, size_t) = &memset;
|
||||
(void)unop_memset(v, 0, n);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue