/* lib/terminal/server/services/hashShare - Creates a unique identifier for a new share object. */ import hash from "../../commands/library/hash.js";
import network from "../transmission/network.js";
import vars from "../../utilities/vars.js";
const hashShare = function terminal_server_services_hashShare(socketData) {
    const hashData = socketData.data, input = {
        algorithm: "sha3-512",
        callback: function terminal_server_services_shareHash(title, hashOutput) {
            const outputBody = JSON.parse(hashOutput.id), hashResponse = {
                device: outputBody.device,
                hash: hashOutput.hash,
                share: outputBody.share,
                type: outputBody.type
            };
            network.send({
                data: hashResponse,
                service: "hash-share"
            }, "browser");
        },
        digest: "hex",
        directInput: true,
        id: JSON.stringify(hashData),
        list: false,
        parent: null,
        source: vars.identity.hashUser + vars.identity.hashDevice + hashData.type + hashData.share,
        stat: null
    };
    hash(input);
};
export default hashShare;
