Beispiel #1
0
 public XmlOutput()
 {
     DefaultExtractorContext context = new DefaultExtractorContext();
     _Conf = context.GetConfiguration();
     _EnableGrhanite = _Conf.EnableGRHANITE;
     _Hasher = InitGrhaniteHasher(_Conf);
 }
Beispiel #2
0
 public XmlOutput(Configuration conf)
 {
     _Conf = conf;
     if (conf != null)
         _Hasher = InitGrhaniteHasher(_Conf);
     else
         _Hasher = null;
 }
Beispiel #3
0
        /// <summary>
        /// Initiates the GRHANITE hasher with all the params required to get it working from the conf.
        /// </summary>
        /// <param name="conf"></param>
        /// <returns></returns>
        private GRHANITEHasher InitGrhaniteHasher(Configuration conf)
        {
            GRHANITEHasher hasher = new GRHANITEHasher();

            // init hasher - with conf
            bool initialiseResult = hasher.InitialiseGRHANITEHashDefinition(conf.OrganisationHashCode, conf.LinkageKey, conf.AdditionalYOBPCodeHash,
                conf.ExcludeMedicare, conf.NameTranspositionAllowed, conf.SuppliesMedicareDigits5to9Only, conf.TightSexMatching, conf.ValidateMedicareChecksum,
                conf.YOBFatherSonChecking);

            if (!initialiseResult)
                throw new Exception("Error - unable to validate the GRHANITE License for this computer - please license it.");

            return hasher;
        }