---
layout: docs
title: hasValidSignature
id: class.Facebook.HackCodegen.SignedSourceBase.hasValidSignature
docid: class.Facebook.HackCodegen.SignedSourceBase.hasValidSignature
permalink: /docs/reference/class.Facebook.HackCodegen.SignedSourceBase.hasValidSignature/
---
# Facebook\\HackCodegen\\SignedSourceBase::hasValidSignature()




Check if a file has a valid signature




``` Hack
public static function hasValidSignature(
  string $file_data,
): bool;
```




Use this when you expect the file
to be signed and valid.




@param  string  File data.
@return bool    True if the file has a signature.




## Parameters




* ` string $file_data `




## Returns




- ` bool `