public KeyedHashAlgorithm GetValidationAlgorithm()
        {
            switch (_hashAlgorithm)
            {
            case ValidationAlgorithm.HmacSha256:
                return(CryptoAlgorithms.CreateHMACSHA256());

            case ValidationAlgorithm.HmacSha384:
                return(CryptoAlgorithms.CreateHMACSHA384());

            case ValidationAlgorithm.HmacSha512:
                return(CryptoAlgorithms.CreateHMACSHA512());
            }
            throw new Exception("Unsupported hash type");
        }