I am building an app where there is a Facebook login and registration in it, so when I need to get the key hashes using this command
keytool -exportcert -alias androiddebugkey -keystore "C:\Users\aasal\.android\debug.keystore" | "C:\OpenSSL\bin\openssl" sha1 -binary | "C:\OpenSSL\bin\openssl" base64
on Window10 PowerShell the following error is being given to me:
+ ... ers\aasal\.android\debug.keystore" | "C:\OpenSSL\bin\openssl" sha1 -b ...
Expressions are only allowed as the first element of a pipeline.
At line:1 char:122
+ ... asal\.android\debug.keystore" | "C:\OpenSSL\bin\openssl" sha1 -binary ...
Unexpected token 'sha1' in expression or statement.
At line:1 char:137
+ ... :\OpenSSL\bin\openssl" sha1 -binary | "C:\OpenSSL\bin\openssl" base64
Expressions are only allowed as the first element of a pipeline.
At line:1 char:162
+ ... :\OpenSSL\bin\openssl" sha1 -binary | "C:\OpenSSL\bin\openssl" base64
Unexpected token 'base64' in expression or statement.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : ExpressionsMustBeFirstInPipeline
NOTE :- I downloaded OpenSSL from this link https://code.google.com/archive/p/openssl-for-windows/downloads I have the latest Java jre1.8.0_241 downloaded from oracle's website. I ran the command from different paths, C:\ , Desktop, C:\Program Files (x86)\Java, and many others and the same error kept happening.