using System.Runtime.InteropServices;
using ProtonVPN.OperatingSystems.WebAuthn.Interop.Marshalers;
using ProtonVPN.OperatingSystems.WebAuthn.Interop.StructVersions;
namespace ProtonVPN.OperatingSystems.WebAuthn.Interop.Structs;
///
/// Information about credential.
///
/// Corresponds to WEBAUTHN_CREDENTIAL.
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public class CredentialOut
{
///
/// Version of this structure, to allow for modifications in the future.
///
private protected CredentialVersion Version { get; set; } = CredentialVersion.Current;
private int _idLength;
private ByteArrayOut _id;
///
/// Well-known credential type specifying what this particular credential is.
///
public string Type { get; private set; }
///
/// Unique ID for this particular credential.
///
public byte[] Id => _id?.Read(_idLength);
private CredentialOut() { }
}