module Origami::Encryption

Module to provide support for encrypting and decrypting PDF documents.

Public Class Methods

rand_bytes(n) click to toggle source

Generates n random bytes from a fast PRNG.

# File lib/origami/encryption.rb, line 233
def self.rand_bytes(n)
    Random.new.bytes(n)
end
strong_rand_bytes(n) click to toggle source

Generates n random bytes from a crypto PRNG.

# File lib/origami/encryption.rb, line 240
def self.strong_rand_bytes(n)
    SecureRandom.random_bytes(n)
end