You can generate signatures like this with the openssl library or the command line utility usually packaged with it.
So with the understanding that I have never worked with Google Cloud Platform, and am only trying to expand on their documentation, to do this by hand you'd need
1) a .pem version of your Google Cloud credentials. lets call it private.pem
Use the process shown at https://cloud.google.com/storage/docs/authentication#converting-the-private-key
2) a policy document. Create that with a text editor, following the example given in your original URL
vi policy.txt
3) a base64 encoding of that policy document. use the Linux tool base64 to make that. You'll get a long string from that. Lets call that STRINGA. Lets say its saved in STRINGA.txt
base64 < policy.txt > STRINGA.txt
4) a signature generated from STRINGA
openssl sha -sha256 -sign private.pem < STRINGA.txt | base64 >SIGNED.txt
5) do a POST from a html form that includes
<input type="hidden" name="policy" value="Put STRINGA string here">
<input type="hidden" name="signature" value="Put SIGNED string here">
similar to what's given as an example in your original URL
https://cloud.google.com/storage/docs/xml-api/post-object#usage_and_examples
I took their example base64 encoded policy document from their HTML code and note with interest that they use \r\n as a line end on the interior but there is no line end after the final } bracket.
SignatureDoesNotMatch