Arlington-based Kastle Systems last year had $85 million in annual revenue. (Kastle Systems)

Still scanning a badge to get into your office building?

That’s so 2015, Mark Ein says.

This is how Ein, chairman of security firm Kastle Systems, gets to work: He walks right in.

The gate to the parking garage opens as he drives up in his Tesla . The building’s doors open as he approaches, thanks to a series of sensors that recognize an app on his iPhone, which he keeps in the inside pocket of his jacket.

“I literally just walk in through the door,” said Ein. “I don’t pull out a card. I don’t wave anything around. It just opens.”

KastlePresence is a new, hands-free approach to office security. (Kastle Systems)

This is KastlePresence, a new, hands-free approach to office security that the Arlington firm began quietly rolling out in buildings across the country earlier this year. About a dozen office buildings are using the technology — including Vornado Realty Trust’s corporate building in Crystal City, which helped test the product for nine months. Roughly 50 buildings across the country have signed up to implement the system by year’s end.

Kastle executives say the new technology is safer — it is encrypted so that each time you open a door, the app creates a new one-time-use key — than its predecessors, which often require workers to scan a badge or chip to access parts of a building. It is more efficient, too, they say, because the app can be downloaded and managed electronically without having to worry about doling out plastic cards and replacing them when they’re misplaced, making the new system more cost-effective for building owners.

“We conceived of this a few years ago and threw a lot of resources at it,” said Ein, a venture capitalist who bought Kastle Systems in 2007. “It is the biggest platform we’ve ever launched.”

In all, Kastle has spent $60 million over the past three years developing and testing the technology. It is the largest undertaking of its kind for the security company, which was founded 42 years ago by an engineer and has since grown into an $85 million-a-year business.

“It sounds like something from ‘Star Trek,’ ” said Kenneth T. Carlisle of SecurityNet, a San Francisco-based consulting firm. “Usually you have to press a button or swipe a card — it’s a very laborious process. If Kastle has found a way to work around that, it’s something I think the current generation of workers would be rather interested in.”

The technology itself is fairly simple: Sensors pick up on nearby smartphones using Bluetooth technology and allow building access accordingly. But executives say its implications are far-reaching and could soon help companies track important data — occupancy patterns, say, or air quality — and adjust building settings, such as heating and air conditioning. The app also has a safety button that allows employees to notify nearby security guards when they are in danger.

“The real value here is in the data,” said Piyush Sodha, the company’s chief executive. “We will be able to say, ‘There are 28 people in the left wing of Kastle from 8 to 9 in the morning.’ All of that is very valuable information.”

After Ein took over Kastle Systems nine years ago, he met with building owners around town, asking about their security needs.

Among the items they wanted: hands-free access to their offices.

“I told him, ‘My tenants are sick of pulling their wallets out of their pockets to scan in — it just doesn’t make sense,’” recalled Michael Darby, principal of District-based Monument Realty. “Having to pull out a key is a stupid thing, especially when I’m also carrying in bags and paperwork and lunch and all of these other things.”

At the time, though, the idea seemed more like a futuristic pipe dream than something Ein could bring to life. He put it on the back burner, focusing instead on creating technology that could help make sense of surveillance footage from video cameras.

But in recent years, Kastle has returned to its roots, looking for new ways to update its “Kastle keys,” which control access to more than 2,000 buildings, including the Empire State Building, the Warner Theatre and the Willard Office Building.

The company is on track to bring in $100 million in revenue this year, keeping in line with annual growth of about 15 percent. It has 450 employees, half of them in the Washington area.

“Year-over-year growth continues to climb,” said Brian Eckert, Kastle’s chief marketing officer. “Security is a fundamental need, in good economic times and bad.”

‘No two doors are alike’

Sodha keeps his iPhone in the front pocket of his pants. Eckert’s is usually in his back pocket. Other employees carry their phones in their purses or briefcases, or are talking on them when they arrive at work.

All of that presented a challenge for Kastle, which had to find a way for its sensors to scan different types of phones in a number of ways. The company’s developers spent weeks finding ways to adjust the placement of its sensors so that they have as wide a range as possible.

There were other hurdles, too: Some people walk faster than others, so Kastle had to find a way to account for paces. (Its solution: a setting in the app that allows each user to choose his gait — slow, medium or fast.)

“This started with a vision, but unfortunately, reality hit along the way,” Sodha said. “You have different people’s behavior, different environments and a multiplicity of phones. That has been the toughest part: achieving universality in what we have.”

The result is a system that is largely customizable, with a series of sensors that can be programmed for different uses. A building’s main entrance, where a dozen people may be coming in at once, may require readers to scan phones in shorter ranges — one foot away, say — than a side door , where a sensor could begin scanning from six feet away.

“We’ve built all this variation into the system because the honest truth is that no two doors are alike,” Sodha said. “You want the main entrance, the external perimeter of the building, to have super-tight controls. But if I’m on the fifth floor, whistling my way in, we can be a bit more flexible.”

There is one more hurdle the company had to account for, Sodha says: phone batteries. KastlePresence works only if a smartphone is powered on with Bluetooth enabled.

But no need to worry if your phone is out of juice, Sodha says. There’s a simple backup: The old-school Kastle key, the kind you wave in front of a sensor.

“We made sure we created an infrastructure that could handle both the new and the old,” he said.

Darby, for one, says he much prefers the new system. He had KastlePresence installed at his offices earlier this year.

“This is a logical transition,” he said. “The way the world is changing, it’s time we move past keys.”