I have a 128 bit 3DES key 1915372928A30803A25B0659A4DD6525, how could I split the key into 3 components and calculate the KCV for each component? I'd like to do similarly to the online tool below
The code i used to generate 3DES key
public byte[] GenerateThreeDesKey()
{
RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();
byte[] tripleDesKey = new byte[16];
rng.GetBytes(tripleDesKey);
for (var i = 0; i < tripleDesKey.Length; ++i)
{
int keyByte = tripleDesKey[i] & 0xFE;
var parity = 0;
for (int b = keyByte; b != 0; b >>= 1)
parity ^= b & 1;
tripleDesKey[i] = (byte)(keyByte | (parity == 0 ? 1 : 0));
}
return tripleDesKey;
}
After getting the key, how to split the key into 3 components and calculate the KCV?