标签:#t
找到 17183 篇相关文章
Um resumo sobre o padrão de segurança HMAC
Definição O HMAC (Hash-based Message Authentication Code) é um mecanismo de segurança que permite verificar a integridade e autenticidade de uma mensagem, garantindo que ela não foi alterada e que foi gerada por quem possui uma chave secreta. Ele é muito usado em autenticação de APIs, tokens e assinaturas digitais. Analogia Imagine que você envia uma carta dentro de um envelope lacrado com um selo exclusivo que só você e o destinatário conhecem a forma de produzir. Se alguém abrir a carta e alterar qualquer palavra, o selo não vai mais bater com o original. O HMAC funciona exatamente assim: ele “lacra” os dados com uma assinatura impossível de reproduzir sem a chave secreta. Exemplo sem HMAC (inseguro) $payload = [ 'user' => 'joao' , 'exp' => time () + 300 ]; // token simples sem proteção $token = base64_encode ( json_encode ( $payload )); Problema Qualquer pessoa pode: decodificar o token alterar exp reencodar e enganar o sistema Exemplo com HMAC (seguro) $payload = [ 'user' => 'joao' , 'exp' => time () + 300 ]; $secret = 'chave_super_secreta' ; $signature = hash_hmac ( 'sha256' , json_encode ( $payload [ 'user' ]) . '|' . $payload [ 'exp' ], $secret ); $payload [ 'sig' ] = $signature ; $token = base64_encode ( json_encode ( $payload )); Validação do lado do servidor $payload = json_decode ( base64_decode ( $_GET [ 'token' ]), true ); $check = hash_hmac ( 'sha256' , json_encode ( $payload [ 'user' ]) . '|' . $payload [ 'exp' ], $secret ); if ( ! hash_equals ( $check , $payload [ 'sig' ])) { die ( "Token inválido" ); }
Ukraine's one-time test used fully autonomous drones to kill Russian soldiers
Full autonomy is rare, but Ukraine is installing AI modules on drones and robots.
Donald Trump’s White House UFC Event Would Be Embarrassing Anywhere
A Monster Energy–sponsored MMA show on the White House’s South Lawn was never going to be the height of dignity. But UFC Freedom 250 is failing to clear even the lowest bar.
Chinese Drivers Are Using Tiny Plastic Heads to Fool Tesla’s Autopilot Safeguards
A cottage industry of celebrity figurines, blinking screens, and other DIY gadgets is helping drivers bypass Tesla's distracted-driving controls.
Elon Musk Is the World’s First Trillionaire
SpaceX’s stock market debut has thrust the richest man in the universe into an unexplored frontier of wealth.
Mistral is rumored to be raising €3B at €20B valuation
The funding round would value the company at around €20 billion (about $23.15 billion), nearly double its Series C valuation of €11.7 billion.
Google sues alleged Chinese cybercrime operation that used AI to send scam texts
The tech giant said a group called "Outsider Enterprise" used AI to scam hundreds of thousands of victims, sending 2.5 million text messages over a span of two weeks.
$130 billion in data center projects blocked by protests so far this year
Winning fight against AI data centers gives people a "taste of political power."
China Didn't Make People Hate Data Centers
GOP lawmakers, tech investors, and even OpenAI have tied the anti-data center movement in the US to Chinese interference. Experts say it’s much more complicated than that.
Siri is good now??
You'd be forgiven for thinking this day would never come. Siri has spent a decade and half somewhere between "sort of useful at a few things" and "utterly disastrous, why did I even try, can it honestly not even set a timer." But the wildest thing just happened: Apple put out a new version of […]
Google Launches Colab CLI for Developers, Automation, and AI Agents
Google has announced the Google Colab CLI, a command-line tool that allows developers and AI agents to interact with remote Colab runtimes directly from a local terminal. By Daniel Dominguez
When it comes to total water use, AI data centers are a drop in the bucket
Even moderately sized data centers can have an outsized local impact.
Google sues Chinese cybercrime network that used Gemini to automate scams
The fraudsters allegedly targeted hundreds of thousands of people with Gemini-coded scams sites.
SpaceX, Anthropic, and OpenAI’s hot IPO summer
The IPO market is back, and it’s not the same companies leading the charge. FAANG had a good run, but a new acronym is taking over: MANGOS — Meta (or Microsoft, depending on who you ask), Anthropic, Nvidia, Google, OpenAI, and SpaceX. Half of that bunch is heading to public markets in the same window, and it’s a stress test for investors, for valuations, and for […]
RFK Jr. melts down over NYT report, admits he blacklists reporters
NYT reported Kennedy is disengaged. Kennedy's response seems to show NYT is right.
I held the Trump phone
Where's the Trump phone? We're going to keep talking about it every week. We've reached out, as usual, to ask about the Trump phone's whereabouts. We don't have the phones we preordered yet, but this week included an unexpected in-person encounter with the T1. You see a lot of interesting phones when you're among tech […]
🔥 grafana / grafana - The open and composable observability and data visualization
GitHub热门项目 | The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more. | Stars: 74,377 | 229 stars this week | 语言: TypeScript
🔥 huggingface / OpenEnv - An interface library for RL post training with environments.
GitHub热门项目 | An interface library for RL post training with environments. | Stars: 2,140 | 222 stars this week | 语言: Python
🔥 gitbutlerapp / gitbutler - The GitButler version control client, backed by Git, powered
GitHub热门项目 | The GitButler version control client, backed by Git, powered by Tauri/Rust/Svelte | Stars: 21,015 | 17 stars today | 语言: Rust