Exemple #1
0
        public static ISecret CreateSecret(string type, string value)
        {
            ISecret result;

            switch (type)
            {
                case PlainTextSecret.Name:
                    result = new PlainTextSecret(value);
                    break;

                case BCryptSecret.Name:
                    result = new BCryptSecret(value);
                    break;

                default:
                    result = null;
                    break;
            }

            return result;
        }
Exemple #2
0
        public static ISecret CreateSecret(string type, string value)
        {
            ISecret result;

            switch (type)
            {
            case PlainTextSecret.Name:
                result = new PlainTextSecret(value);
                break;

            case BCryptSecret.Name:
                result = new BCryptSecret(value);
                break;

            default:
                result = null;
                break;
            }

            return(result);
        }