private void RegisterFingerprintData(string key, byte[] fingerprintData)
{
if (fingerprintData == null || fingerprintData.Length <= 0)
throw new ArgumentException("fingerprintData is invalid");
if (string.IsNullOrWhiteSpace(key))
throw new ArgumentException("key needs to contain a valid string");
var bufferLength = System.Convert.ToUInt32(fingerprintData.Length);
var printDataFromBufferPtr = Interop.fp_print_data_from_data(fingerprintData, bufferLength);
if (printDataFromBufferPtr == IntPtr.Zero)
throw new FormatException("The fingerprint data buffer is invalid.");
if (this.HasKey(key))
this.Remove(key, false);
InternalList.Add(new Fingerprint() { Identifier = key, Reference = printDataFromBufferPtr });
}