-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
web-push/spec/web_push/vapid_key_spec.rb
Line 19 in 20f40d9
expect(Base64.urlsafe_decode64(key.private_key).bytesize).to eq(32) |
occasionally this is 31 bytes
key = nil
30_000.times do |x|
key = Webpush::VapidKey.new
if key.curve.private_key.to_s(2).bytesize < 32
puts x
break
end
end
puts([format("%064x", key.curve.private_key.to_i)].pack('H*').bytes[0...3])
puts '---'
puts(key.curve.private_key.to_s(2).bytes[0...3])
Metadata
Metadata
Assignees
Labels
No labels