Method: Webpush::VapidKey#private_key

Defined in:
lib/webpush/vapid_key.rb

#private_keyString

Retrive the encoded elliptic curve private key for VAPID protocol

Returns:

  • (String)

    base64 urlsafe-encoded binary representation of 32-byte VAPID private key



55
56
57
# File 'lib/webpush/vapid_key.rb', line 55

def private_key
  encode64(curve.private_key.to_s(2))
end