diff --git a/src/PCLCrypto/iOS/RsaAsymmetricKeyAlgorithmProvider.cs b/src/PCLCrypto/iOS/RsaAsymmetricKeyAlgorithmProvider.cs index 999cda8a..9635badd 100644 --- a/src/PCLCrypto/iOS/RsaAsymmetricKeyAlgorithmProvider.cs +++ b/src/PCLCrypto/iOS/RsaAsymmetricKeyAlgorithmProvider.cs @@ -132,7 +132,7 @@ public ICryptographicKey ImportPublicKey(byte[] keyBlob, CryptographicPublicKeyB // Inject the PKCS#1 public key into the KeyChain. string keyIdentifier = Guid.NewGuid().ToString(); string publicKeyIdentifier = RsaCryptographicKey.GetPublicKeyIdentifierWithTag(keyIdentifier); - var keyQueryDictionary = RsaCryptographicKey.CreateKeyQueryDictionary(publicKeyIdentifier); + using var keyQueryDictionary = RsaCryptographicKey.CreateKeyQueryDictionary(publicKeyIdentifier); keyQueryDictionary[KSec.ValueData] = NSData.FromArray(KeyFormatter.Pkcs1.Write(parameters, includePrivateKey: false)); keyQueryDictionary[KSec.AttrKeyClass] = KSec.AttrKeyClassPublic; keyQueryDictionary[KSec.ReturnRef] = NSNumber.FromBoolean(true);