fix sign field name

This commit is contained in:
Pete Matsyburka authored and Oleksandr Turchyn committed 2024-10-07 15:30:39 +03:00
1 parent 6b42dcf91b
commit 95e9b34033
1 file changed
+13
+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)