Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
index.js21 linesDownload Raw Back to timestamp
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.getTSATimestamp = getTSATimestamp;
4exports.getTLogTimestamp = getTLogTimestamp;
5const tsa_1 = require("./tsa");
6function getTSATimestamp(timestamp, data, timestampAuthorities) {
7    (0, tsa_1.verifyRFC3161Timestamp)(timestamp, data, timestampAuthorities);
8    return {
9        type: 'timestamp-authority',
10        logID: timestamp.signerSerialNumber,
11        timestamp: timestamp.signingTime,
12    };
13}
14function getTLogTimestamp(entry) {
15    return {
16        type: 'transparency-log',
17        logID: entry.logId.keyId,
18        timestamp: new Date(Number(entry.integratedTime) * 1000),
19    };
20}
21 
codekingpro/portable-devtools · Team Ai