Packages

A simple Cryptography Implementation in Elixir for the Ark Blockchain.

Current section

Files

Jump to
arkecosystem_crypto lib arkecosystem crypto identities wif.ex
Raw

lib/arkecosystem/crypto/identities/wif.ex

defmodule ArkEcosystem.Crypto.Identities.WIF do
alias ArkEcosystem.Crypto.Helpers.Base58Check
alias ArkEcosystem.Crypto.Configuration.Network
def from_passphrase(passphrase, network \\ nil) do
network = network || Network.get()
passphrase = :crypto.hash(:sha256, passphrase) <> <<1>>
Base58Check.encode58check(<<network.wif>>, passphrase)
end
end