This PR removes excess reserve()
call for SecureString
Call reverse
was introduced when std::string
was used. For std::string
, this makes sense as it prevents re-allocation when the string’s size increases to prevent a situation that memory will be re-allocated and “zeroing” will clean only the latest region, but not all of them.
However, with the use of a custom allocator, this call is no longer necessary; secure_allocator
from support/allocators/secure.h
ensures that all re-allocation would be safely re-written and secret passphrase won’t stay in memory.