public AESEngine Next(AESType t) { AESEngine next; if (GlobalPool<AESEngine>.GetObject(out next, this, t)) { next.Type = Type == AESType.EMPTY ? AESType.EMPTY : t; next._key = _key; next._direction = _direction; } else { next._canRecycle = true; } return next; }
public AESEngine(AESEngine other, AESType type) { Type = other.Type == AESType.EMPTY ? AESType.EMPTY : type; _key = other._key; _direction = other._direction; }
public AESEngine(byte[] key = null,Direction direction = Direction.DECRYPT) { _direction = direction; Type = key == null ? AESType.EMPTY : AESType.DEFAULT; _key = _direction == Direction.DECRYPT ? GetDecryptKey(key) : GetEncryptKey(key); }