public/private key exporter, fix for array.fromString bug