@httpoison Application.get_env(:pleroma, :httpoison)
use Bitwise
+
alias Pleroma.Instances
- alias Pleroma.Web.XML
- alias Pleroma.Web.OStatus.ActivityRepresenter
alias Pleroma.User
+ alias Pleroma.Web.OStatus.ActivityRepresenter
+ alias Pleroma.Web.XML
+
require Logger
def decode(salmon) do
# Native generation of RSA keys is only available since OTP 20+ and in default build conditions
# We try at compile time to generate natively an RSA key otherwise we fallback on the old way.
try do
- _ = :public_key.generate_key({:rsa, 2048, 65537})
+ _ = :public_key.generate_key({:rsa, 2048, 65_537})
def generate_rsa_pem do
- key = :public_key.generate_key({:rsa, 2048, 65537})
+ key = :public_key.generate_key({:rsa, 2048, 65_537})
entry = :public_key.pem_entry_encode(:RSAPrivateKey, key)
pem = :public_key.pem_encode([entry]) |> String.trim_trailing()
{:ok, pem}