Photoshop Custom Shape
application/octet-stream
Magic Bytes
Offset: 0
63 78 73 70 61 72 73 65
Photoshop Custom Shape (CSH) is a proprietary vector graphics format developed and maintained by Adobe Inc. for use within the Photoshop ecosystem. These files store collections of predefined vector silhouettes, allowing designers to insert and scale geometries without compromising image resolution. This format serves as a passive data container for the Photoshop Presets Manager, contains no executable scripts, and is generally considered safe for use in professional design environments.
Validation Code
How to validate .csh files in Python
Python
def is_csh(file_path: str) -> bool:
"""Check if file is a valid CSH by magic bytes."""
signature = bytes([0x63, 0x78, 0x73, 0x70, 0x61, 0x72, 0x73, 0x65])
with open(file_path, "rb") as f:
return f.read(8) == signature
How to validate .csh files in Node.js
Node.js
function isCSH(buffer: Buffer): boolean {
const signature = Buffer.from([0x63, 0x78, 0x73, 0x70, 0x61, 0x72, 0x73, 0x65]);
return buffer.subarray(0, 8).equals(signature);
}
Go
func IsCSH(data []byte) bool {
signature := []byte{0x63, 0x78, 0x73, 0x70, 0x61, 0x72, 0x73, 0x65}
if len(data) < 8 {
return false
}
return bytes.Equal(data[:8], signature)
}
API Endpoint
GET
/api/v1/csh
curl https://filesignature.org/api/v1/csh