SecureString update

Used MemoryStream.ToArray() method instead of manually creating a byte
array with New-Object, Seek and Read.