public static EcKey loadEcKey() { using (FileStream fs = File.OpenRead(PRIV_KEY_FILENAME)) { byte[] b = new byte[1024]; fs.Read(b, 0, b.Length); EcKey key = EcKey.FromAsn1(b); return(key); } }
public static async Task <EcKey> LoadEcKey() { using (var fs = File.OpenRead(PrivateKeyFilename)) { var b = new byte[1024]; await fs.ReadAsync(b, 0, b.Length); var key = EcKey.FromAsn1(b); return(key); } }
public static EcKey loadEcKey(string path) { using (FileStream fs = File.OpenRead(path)) { byte[] b = new byte[1024]; fs.Read(b, 0, b.Length); EcKey key = EcKey.FromAsn1(b); return(key); } }
public static EcKey loadEcKey() { using (FileStream fs = File.OpenRead(GetPrivateKeyFullName())) { byte[] b = new byte[1024]; fs.Read(b, 0, b.Length); EcKey key = EcKey.FromAsn1(b); return(key); } }