android / android/identity-samples
base64: invalid input
- Dominant language
- Kotlin
- Stars
- 515
- Forks
- 283
- Avg merge
- 9h 37m
- Merged PRs (30d)
- 2
Description
**Issue by [Drjacky](https://github.com/Drjacky)**
_Tuesday Jun 25, 2019 at 15:35 GMT_
_Originally opened as https://github.com/googlesamples/android-credentials/issues/40_
----
When I use iTerm2 terminal and work with the file, it shows:
> base64: invalid input
But still generating some part of a wrong `certificate in hex` and generating a wrong `SMS Retriever hash code` as well.
But when I use regular Terminal, it works well.
A sample wrong output:
```
➜ Desktop ./sms_retriever_hash_v9.sh --package com.example.test --keystore /path/keystore.jks
package name: com.example.test
keystore file: /path/keystore.jks
File /path/keystore.jks is found.
Enter keystore password: password
base64: invalid input
certificate in hex: 328202c5308201ada00362010202043d1336f8300d06092a864486f70d01010b050030133111300f0603550403430853
SHA-256 output in hex: bf0ae40bf16485b2320765f3c824e263dfba8d09ec46307d6b4dd3153cfbc287
First 8 bytes encoded by base64: ywrkS/HkhbI
SMS Retriever hash code: ywrkS/HkhbI
```
Machine: Mac OS 10.14.5
iTerm2 version: 3.2.9
Contributor guide
Research direction
Start with sms_retriever_hash_v9.sh and reproduce the command shown using iTerm2 and regular Terminal on macOS, focusing on the reported `base64: invalid input` output. Done means the script completes without that error and produces the same correct certificate, SHA-256 output, and SMS Retriever hash in both terminals.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, shell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100