Changed endianness of LJ1200 message parser and rearranged the message string.

This commit is contained in:
dennis.sheirer
2014-11-18 02:01:26 +00:00
parent def5f9ed6f
commit 960de375bc
4 changed files with 55 additions and 16 deletions

View File

@@ -12,7 +12,8 @@ public enum Encryption
DES_OFB( 0x81 ),
TRIPLE_DES_2_KEY( 0x82 ),
TRIPLE_DES_3_KEY( 0x83 ),
AES( 0x84 );
AES( 0x84 ),
UNKNOWN( -1 );
private int mValue;
@@ -20,4 +21,34 @@ public enum Encryption
{
mValue = value;
}
public static Encryption fromValue( int value )
{
switch( value )
{
case 0x00:
return ACCORDION_1_3;
case 0x01:
return BATON_AUTO_EVEN;
case 0x02:
return FIREFLY_TYPE1;
case 0x03:
return MAYFLY_TYPE1;
case 0x04:
return SAVILLE;
case 0x41:
return BATON_AUTO_ODD;
case 0x80:
return UNENCRYPTED;
case 0x82:
return TRIPLE_DES_2_KEY;
case 0x83:
return TRIPLE_DES_3_KEY;
case 0x84:
return AES;
default:
return UNKNOWN;
}
}
}