[][src]Function activeledger::key::export::export_ec

pub fn export_ec(key: &EllipticCurve, path: &str) -> KeyResult<()>

Export an EC key to the specified location.Key.

The data will be stored as a JSON file.

Example

let ec = EllipticCurve::new("Key name").unwrap();
let path = "export/path/file.json";

// Pass a reference of the key and write path to the exporter
export::export_ec(&ec, &path).unwrap();
// Note! The path must include the file name!

Errors

If this function cannot export the given key it will return an ExportError.