# Crypt::TimestampedData Command Line Tools

This directory contains command-line utilities for working with TimeStampedData (.tsd) files.

## Scripts

### tsd-create
Creates a TimeStampedData (.tsd) file from a file and timestamp token.

```bash
# Basic usage
tsd-create -t timestamp.tsr document.pdf

# Specify output file
tsd-create -t timestamp.tsr -o document.tsd document.pdf

# Verbose output
tsd-create -v -t timestamp.tsr document.pdf
```

### tsd-extract
Extracts content and timestamps from a TimeStampedData (.tsd) file.

```bash
# Extract content only
tsd-extract document.tsd

# Extract content to specific file
tsd-extract -o original.pdf document.tsd

# Extract content and timestamps
tsd-extract -t document.tsd

# Extract with custom timestamp directory
tsd-extract -t -d my_timestamps document.tsd
```

### tsd-info
Displays information about a TimeStampedData (.tsd) file.

```bash
# Basic information
tsd-info document.tsd

# Verbose information
tsd-info -v document.tsd
```

### tsd-timestamp
Gets a timestamp from FreeTSA.org for a file.

```bash
# Get timestamp for a file
tsd-timestamp document.pdf

# Specify output file
tsd-timestamp -o my_timestamp.tsr document.pdf

# Use different hash algorithm
tsd-timestamp -a sha256 document.pdf
```

## Complete Workflow Example

```bash
# 1. Get timestamp from FreeTSA
tsd-timestamp document.pdf

# 2. Create TSD file
tsd-create -t document.pdf.tsr document.pdf

# 3. Verify TSD file
tsd-info document.tsd

# 4. Extract content and timestamps
tsd-extract -t document.tsd
```

## Requirements

- Perl 5.6.0 or later
- Crypt::TimestampedData module
- OpenSSL (for tsd-timestamp)
- Internet connection (for tsd-timestamp)

## Installation

These scripts are automatically installed when you install the Crypt::TimestampedData module:

```bash
cpan Crypt::TimestampedData
```

The scripts will be available in your PATH after installation.
