Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/elcuervo/firma

Adds a secure signature to pdf
https://github.com/elcuervo/firma

Last synced: 22 days ago
JSON representation

Adds a secure signature to pdf

Awesome Lists containing this project

README

        

# Firma
![](http://www.duhaime.org/Portals/duhaime/images/Copperman-signature.jpg)

Add a secure signature to a pdf file.

## Installation

```bash
gem install firma
```

## Check if a pdf it's signed

```ruby
require "firma"

Firma.is_signed?("my_file.pdf")
```

## Sign a pdf file

```ruby
require "firma"

Firma.sign("my_file.pdf",
key: "key.pem",
passphrase: "passphrase",
certificate: "key.crt"
)
```

## Sign a pdf file with newly generated certificates

```ruby
require "firma"

keys = Firma.generate_keys("passphrase")

Firma.sign("my_file.pdf",
key: keys.fetch(:key),
passphrase: "passphrase",
certificate: keys.fetch(:certificate)
)
```