[−][src]Function ripple_address_codec::encode_seed
pub fn encode_seed(entropy: &Entropy, algorithm: &Algorithm) -> String
Encode the given entropy as an XRP Ledger seed (secret)
The entropy must be exactly 16 bytes (128 bits). The encoding includes which elliptic curve digital signature algorithm the seed is intended to be used with. The seed is used to produce the private key.
Examples
use ripple_address_codec::{encode_seed, Secp256k1, Ed25519}; // In the real world you **must** generate random entropy let naive_entropy = [0; 16]; assert_eq!(encode_seed(&naive_entropy, &Secp256k1), "sp6JS7f14BuwFY8Mw6bTtLKWauoUs"); assert_eq!(encode_seed(&naive_entropy, &Ed25519), "sEdSJHS4oiAdz7w2X2ni1gFiqtbJHqE");