mirror of
https://github.com/internetee/registry.git
synced 2025-08-02 16:02:03 +02:00
Fix BL after master emrge
This commit is contained in:
parent
43e5b74668
commit
c5e2ebe15e
5 changed files with 24 additions and 30 deletions
|
@ -128,5 +128,13 @@ class Dnskey < ApplicationRecord
|
|||
def bin_to_hex(s)
|
||||
s.each_byte.map { |b| format('%02X', b) }.join
|
||||
end
|
||||
|
||||
def pub_key_base64?(pub)
|
||||
return unless pub&.is_a?(String)
|
||||
|
||||
Base64.strict_encode64(Base64.strict_decode64(pub)) == pub
|
||||
rescue ArgumentError
|
||||
false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue