Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Hashids and Perceptual hashes
Search
Jens Segers
April 29, 2015
Technology
150
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Hashids and Perceptual hashes
PHP Ghent presentation
Jens Segers
April 29, 2015
More Decks by Jens Segers
See All by Jens Segers
Building a digital ID card for authentication
jenssegers
0
84
JSON Web Tokens in a microservice architecture (PHPBenelux)
jenssegers
0
570
JSON Web Tokens - PHP Antwerp
jenssegers
0
230
Testing API's with Behat
jenssegers
0
390
Apps for Ghent - Realo
jenssegers
0
340
An introduction to automated development environment and Laravel Homestead
jenssegers
0
260
Git 101
jenssegers
1
200
Other Decks in Technology
See All in Technology
GoCon2026 - Open Source, Open World
sanposhiho
3
3.2k
AI活用の現在地、 ちゃんと見えてますか?/XPfest-2026
visional_engineering_and_design
0
180
Claude in Chrome 入門 / Introduction to Claude in Chrome
cielo1985
0
180
幾何アルゴリズムで なめらかなピン操作を / iOSDC Japan 2026 / smoothpin
kazumanagano
0
260
The Agent Builder Loop from Daily Work to OSS
minorun365
PRO
3
130
生成AIのテナント制御とシャドーMCP対策 | AIを"止めずに"、情報を守る
yukun
0
150
深夜のクラウド懺悔室 1:29:300 or 1:0:0
kazzpapa3
1
230
When Does a Local Qwen Start to Break
morshoto
0
200
Microsoft 365 Copilot chat -tekoälypalvelun tietosuojaongelmat
hponka
0
660
作品が生態系になった ─ Mini Tokyo 3D から世界へ
nagix
0
150
Sigmaユーザーのための有用リソース一挙公開 & Sigmaで使えるMCP #sigma_ucj /useful-resources-for-sigma-computing-users-and-mcps-with-sigma
shinyaa31
0
190
OpenTelemetryのメトリクスをCloudWatchに送ってPromQLで見てみた
ota1022
0
120
Featured
See All Featured
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
Why Our Code Smells
bkeepers
PRO
340
58k
[RailsConf 2023] Rails as a piece of cake
palkan
59
7k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
690
Bash Introduction
62gerente
615
220k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Optimising Largest Contentful Paint
csswizardry
37
3.9k
For a Future-Friendly Web
brad_frost
183
10k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.6k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.3k
Google's AI Overviews - The New Search
badams
0
1.6k
Amusing Abliteration
ianozsvald
1
290
Transcript
None
@jenssegers Jens Segers
Hashids hashids/hashids
youtube.com/watch?v=dQw4w9WgXcQ
Why id obfuscation? Hiding application internals Reduces chance for URL
guessing Hide number of users, articles, … More difficult for scrapers
Encoding ids $hashids = new Hashids\Hashids('salt'); $encodedId = $hashids->encode(123); $hashids
= new Hashids\Hashids('salt'); $decodedId = $hashids->decode('Mj3')[0]; Decoding ids
Perceptual hashes jenssegers/imagehash
Removing thumbnails and duplicate images
#b40b2980dcbd08a #c1e9ee950f0e56cc Different from cryptographic hashing
Perceptual fingerprint No avalanche effect Comparing hashes Similar images =
similar hashes
Hamming Distance Number of different individual bits gmp_hamdist(0b10100110001, 0b10100110101) =
1
None
None
None
None
0000000000000010000000110000011100001111000111110110111111111111
0000000000000010000000110000011100001111000111110110111111111111 1011000110001000111110000000010100100111110100000100010100001010
Calculating the hash Using a different implementation: use Jenssegers\ImageHash\ImageHash; $hasher
= new ImageHash; $hash = $hasher->hash('path/to/image.jpg'); use Jenssegers\ImageHash\Implementation\AverageHash; $hasher = new ImageHash(new AverageHash); $hash = $hasher->hash('path/to/image.jpg');
Comparing hashes Or use your database: $d = $hasher->compare('image1.jpg', 'image2.jpg');
$d = $hasher->distance($hash1, $hash2); SELECT BIT_COUNT(hash ^ :hash) as hamming_distance FROM images HAVING hamming_distance < 5
@jenssegers Jens Segers