This commit is contained in:
TheJoKlLa
2020-11-04 00:41:19 +01:00
parent 2049e7eba3
commit 4004413af7
7 changed files with 517 additions and 83 deletions

View File

@ -39,6 +39,17 @@ namespace NFC.Crypto
}
}
/// <summary>
/// Creates Key from String
/// </summary>
/// <param name="key">Key</param>
/// <param name="cipher">Cipher for Key</param>
/// <param name="keyVersion">Version of Key</param>
public CipherKey(string key, CipherType cipher, byte keyVersion) : this(HexConverter.ConvertFromHexString(key), cipher, keyVersion)
{
}
/// <summary>
/// Generates Empty Key
/// </summary>
@ -122,7 +133,7 @@ namespace NFC.Crypto
switch (cipher)
{
case CipherType.TDES:
return 8;
return 16;
case CipherType.TDES_2K:
return 16;
case CipherType.TDES_3K: