Photoshop Custom Shape (.csh)
.csh file signature | application/octet-stream
Photoshop Custom Shape
Magic Bytes
Offset 0
63 75 73 68 00 00 00 02 00 00 00
Sources: Gary Kessler
Extension
.csh
MIME Type
application/octet-stream
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .csh files in Python
def is_csh(file_path: str) -> bool:
"""Check if file is a valid CSH by magic bytes."""
signature = bytes([0x63, 0x75, 0x73, 0x68, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00])
with open(file_path, "rb") as f:
return f.read(11) == signature
How to validate .csh files in Node.js
function isCSH(buffer: Buffer): boolean {
const signature = Buffer.from([0x63, 0x75, 0x73, 0x68, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00]);
return buffer.subarray(0, 11).equals(signature);
}
How to validate .csh files in Go
func IsCSH(data []byte) bool {
signature := []byte{0x63, 0x75, 0x73, 0x68, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00}
if len(data) < 11 {
return false
}
return bytes.Equal(data[:11], signature)
}
API Endpoint
/api/v1/csh
curl https://filesignature.org/api/v1/csh
See the full API documentation for all endpoints and parameters.
Frequently Asked Questions
What is a .csh file?
A .csh file is a Photoshop Custom Shape file. Photoshop Custom Shape
What are the magic bytes for .csh files?
The magic bytes for Photoshop Custom Shape files are 63 75 73 68 00 00 00 02 00 00 00 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .csh file?
To validate a .csh file, read the first bytes of the file and compare them against the known magic bytes (63 75 73 68 00 00 00 02 00 00 00) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .csh files?
There is no officially registered MIME type for .csh files. Systems typically use application/octet-stream as a generic fallback when handling this format.
Is it safe to open .csh files?
Photoshop Custom Shape (.csh) files are generally safe to open. They are classified as low risk because they primarily contain data rather than executable code. However, always ensure files come from a trusted source.