Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

1.1 KB
Raw Blame
//-----------------------------------------------------------------------
// <copyright file="BlobHashesRequest.cs" company="aliasvault">
// Copyright (c) aliasvault. All rights reserved.
// Licensed under the AGPLv3 license. See LICENSE.md file in the project root for full license information.
// </copyright>
//-----------------------------------------------------------------------

namespace AliasVault.Shared.Models.WebApi.V2.Vault;

using System.ComponentModel.DataAnnotations;

/// <summary>
/// A list of blob hashes, sent as a POST body (not a query string) because a vault can reference hundreds of
/// blobs and 64-char hex hashes would exceed URL length limits. Used by POST /v2/Vault/blobs/missing and
/// POST /v2/Vault/blobs/download.
/// </summary>
public class BlobHashesRequest
{
    /// <summary>Gets or sets the manifest the hashes belong to.</summary>
    public required Guid ManifestId { get; set; }

    /// <summary>Gets or sets the per-manifest salted SHA-256 hex hashes.</summary>
    [MaxLength(VaultWriteLimits.MaxHashesPerRequest)]
    public required List<string> Hashes { get; set; }
}