Esempio n. 1
0
        public static ITEA Create(TeaTypes type, TeaKey key)
        {
            switch (type)
            {
            case TeaTypes.TEA:
                return(new TEAFunction(key));

            case TeaTypes.XTEA:
                return(new XTEAFunction(key));

            case TeaTypes.XXTEA:
                return(new XXTEAFunction(key));

            default:
                throw new ArgumentOutOfRangeException(nameof(type), type, null);
            }
        }
Esempio n. 2
0
 public static ITEA Create(TeaTypes type, TeaKey key) => Factory.Create(type, key);