Esempio n. 1
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;
        }