mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 20:04:13 +08:00
(GetScheme): fixed potential bug when looking up unknown encryption scheme.
This commit is contained in:
parent
1c5008d799
commit
12df1dcdfd
@ -290,11 +290,9 @@ NextEntry:
|
|||||||
|
|
||||||
public static ICrypt GetScheme (string scheme)
|
public static ICrypt GetScheme (string scheme)
|
||||||
{
|
{
|
||||||
ICrypt algorithm = NoCryptAlgorithm;
|
ICrypt algorithm;
|
||||||
if (!string.IsNullOrEmpty (scheme))
|
if (string.IsNullOrEmpty (scheme) || !KnownSchemes.TryGetValue (scheme, out algorithm))
|
||||||
{
|
algorithm = NoCryptAlgorithm;
|
||||||
KnownSchemes.TryGetValue (scheme, out algorithm);
|
|
||||||
}
|
|
||||||
return algorithm;
|
return algorithm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user