Class: RustPdf::SignaturePolicy

Inherits:
Object
  • Object
show all
Defined in:
lib/rustpdf.rb

Overview

A signature-policy identifier (PAdES-EPES / ICP-Brasil AD-RB).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(oid:, hash:, hash_algorithm_oid: nil, uri: nil) ⇒ SignaturePolicy

oid: dotted-decimal policy OID; hash: policy document hash bytes (under hash_algorithm_oid, nil = SHA-256); uri: optional SPURI.



159
160
161
162
163
164
# File 'lib/rustpdf.rb', line 159

def initialize(oid:, hash:, hash_algorithm_oid: nil, uri: nil)
  @oid = oid
  @hash = hash
  @hash_algorithm_oid = hash_algorithm_oid
  @uri = uri
end

Instance Attribute Details

#hashObject

Returns the value of attribute hash.



155
156
157
# File 'lib/rustpdf.rb', line 155

def hash
  @hash
end

#hash_algorithm_oidObject

Returns the value of attribute hash_algorithm_oid.



155
156
157
# File 'lib/rustpdf.rb', line 155

def hash_algorithm_oid
  @hash_algorithm_oid
end

#oidObject

Returns the value of attribute oid.



155
156
157
# File 'lib/rustpdf.rb', line 155

def oid
  @oid
end

#uriObject

Returns the value of attribute uri.



155
156
157
# File 'lib/rustpdf.rb', line 155

def uri
  @uri
end