"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.collectTargets = collectTargets;
const models_1 = require("@tufjs/models");
const crypto_1 = require("./crypto");
function collectTargets(targets) {
    return targets.map((target) => {
        return new models_1.TargetFile({
            path: target.name,
            length: target.content.length,
            hashes: { sha256: (0, crypto_1.digestSHA256)(target.content) },
        });
    });
}
