mirror of
https://github.com/docusealco/docuseal
synced 2026-11-06 06:52:33 -05:00
fix pdf
This commit is contained in:
1 parent
507ca49112
commit
561b16e9fb
1 file changed
+14
@@ -11,6 +11,20 @@ module HexaPDF
|
|||||||
string_algorithm.encrypt(key, str).dup
|
string_algorithm.encrypt(key, str).dup
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
module AES
|
||||||
|
module ClassMethods
|
||||||
|
def unpad(data)
|
||||||
|
padding_length = data.getbyte(-1)
|
||||||
|
if !padding_length || padding_length > BLOCK_SIZE || padding_length.zero? ||
|
||||||
|
data[-padding_length, padding_length].each_byte.any? { |byte| byte != padding_length }
|
||||||
|
data
|
||||||
|
else
|
||||||
|
data[0...-padding_length]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
module Type
|
module Type
|
||||||
|
|||||||
Reference in new issue
Block a user