diff --git a/CryptoExchange.Net/Authentication/ApiCredentials.cs b/CryptoExchange.Net/Authentication/ApiCredentials.cs
index 3984138..c3e4523 100644
--- a/CryptoExchange.Net/Authentication/ApiCredentials.cs
+++ b/CryptoExchange.Net/Authentication/ApiCredentials.cs
@@ -70,8 +70,8 @@ namespace CryptoExchange.Net.Authentication
public virtual ApiCredentials Copy()
{
if (PrivateKey == null)
- // Use .ToString() to create a copy of the SecureString
- return new ApiCredentials(Key!.ToString(), Secret!.ToString());
+ // Use .GetString() to create a copy of the SecureString
+ return new ApiCredentials(Key!.GetString(), Secret!.GetString());
else
return new ApiCredentials(PrivateKey!.Copy());
}
diff --git a/CryptoExchange.Net/CryptoExchange.Net.csproj b/CryptoExchange.Net/CryptoExchange.Net.csproj
index 6e4c727..4b4663b 100644
--- a/CryptoExchange.Net/CryptoExchange.Net.csproj
+++ b/CryptoExchange.Net/CryptoExchange.Net.csproj
@@ -6,16 +6,16 @@
CryptoExchange.Net
JKorf
A base package for implementing cryptocurrency API's
- 5.1.0
- 5.1.0
- 5.1.0
+ 5.1.1
+ 5.1.1
+ 5.1.1
false
git
https://github.com/JKorf/CryptoExchange.Net.git
https://github.com/JKorf/CryptoExchange.Net
en
true
- 5.1.0 - Improved dispose handling in SymbolOrderBook, Fixed TimeSync RecalculationInterval not being respected, Small rework client options
+ 5.1.1 - Fixed issue ApiCredentials
enable
9.0
MIT
diff --git a/README.md b/README.md
index 730e1ed..3eab330 100644
--- a/README.md
+++ b/README.md
@@ -18,6 +18,9 @@ I develop and maintain this package on my own for free in my spare time. Donatio
Alternatively, sponsor me on Github using [Github Sponsors](https://github.com/sponsors/JKorf)
## Release notes
+* Version 5.1.1 - 24 Feb 2022
+ * Fixed issue ApiCredentials
+
* Version 5.1.0 - 24 Feb 2022
* Improved dispose handling in SymbolOrderBook
* Fixed TimeSync RecalculationInterval not being respected