PufferASCII-armored encrypted archive (.apuf)
.apuf file signature | application/octet-stream
PufferASCII-armored encrypted archive
Magic Bytes
Offset 0
42 65 67 69 6E 20 50 75 66 66 65 72 20 44 61 74 61 0D 0A
Sources: Gary Kessler
Extension
.apuf
MIME Type
application/octet-stream
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .apuf files in Python
def is_apuf(file_path: str) -> bool:
"""Check if file is a valid APUF by magic bytes."""
signature = bytes([0x42, 0x65, 0x67, 0x69, 0x6E, 0x20, 0x50, 0x75, 0x66, 0x66, 0x65, 0x72, 0x20, 0x44, 0x61, 0x74, 0x61, 0x0D, 0x0A])
with open(file_path, "rb") as f:
return f.read(19) == signature
How to validate .apuf files in Node.js
function isAPUF(buffer: Buffer): boolean {
const signature = Buffer.from([0x42, 0x65, 0x67, 0x69, 0x6E, 0x20, 0x50, 0x75, 0x66, 0x66, 0x65, 0x72, 0x20, 0x44, 0x61, 0x74, 0x61, 0x0D, 0x0A]);
return buffer.subarray(0, 19).equals(signature);
}
How to validate .apuf files in Go
func IsAPUF(data []byte) bool {
signature := []byte{0x42, 0x65, 0x67, 0x69, 0x6E, 0x20, 0x50, 0x75, 0x66, 0x66, 0x65, 0x72, 0x20, 0x44, 0x61, 0x74, 0x61, 0x0D, 0x0A}
if len(data) < 19 {
return false
}
return bytes.Equal(data[:19], signature)
}
API Endpoint
/api/v1/apuf
curl https://filesignature.org/api/v1/apuf
See the full API documentation for all endpoints and parameters.
Frequently Asked Questions
What is a .apuf file?
A .apuf file is a PufferASCII-armored encrypted archive file. PufferASCII-armored encrypted archive
What are the magic bytes for .apuf files?
The magic bytes for PufferASCII-armored encrypted archive files are 42 65 67 69 6E 20 50 75 66 66 65 72 20 44 61 74 61 0D 0A at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .apuf file?
To validate a .apuf file, read the first bytes of the file and compare them against the known magic bytes (42 65 67 69 6E 20 50 75 66 66 65 72 20 44 61 74 61 0D 0A) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .apuf files?
There is no officially registered MIME type for .apuf files. Systems typically use application/octet-stream as a generic fallback when handling this format.
Is it safe to open .apuf files?
PufferASCII-armored encrypted archive (.apuf) 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.