fix sign field name

This commit is contained in:
Pete Matsyburka
2024-10-01 17:19:29 +03:00
committed by Oleksandr Turchyn
parent 6b42dcf91b
commit 95e9b34033
+13
View File
@@ -1,6 +1,19 @@
# frozen_string_literal: true
module HexaPDF
module DigitalSignature
class Signatures
private
def generate_field_name
index = (@document.acro_form.each_field
.map { |field| field.full_field_name.to_s.scan(/\ASignature(\d+)/).first&.first.to_i }
.max || 0) + 1
"Signature#{index}"
end
end
end
module Encryption
class SecurityHandler
def encrypt_string(str, obj)