9 #ifndef CPPSECURITY_STRING_PASSWORD_H
10 #define CPPSECURITY_STRING_PASSWORD_H
12 #include "memory/memory.h"
23 typedef typename std::allocator<T>::value_type
value_type;
24 typedef typename std::allocator<T>::size_type
size_type;
35 CppCommon::Memory::ZeroFill(p, n *
sizeof(T));
36 std::allocator<T>::deallocate(p, n);
52 class password :
public std::basic_string<char, std::char_traits<char>, CppSecurity::PasswordAllocator<char>>
55 using basic_string::basic_string;
57 void clear() noexcept { CppCommon::Memory::ZeroFill(data(), size()); }
PasswordAllocator(const PasswordAllocator< U > &)
std::allocator< T >::size_type size_type
std::allocator< T >::value_type value_type
PasswordAllocator(const PasswordAllocator &)
std::allocator< T >::difference_type difference_type
void deallocate(T *p, size_type n)
PasswordAllocator< U > other