OpenSSL: Supporting Utilities

Other Supporting Utilities

Mi'kail Eli'yah
3 min readApr 20, 2020

Supporting Utilities

Generating Random Bytes

Under [keys.sh], you can generate random bytes. Example(s):

$ source ./keys.sh # or use reload_bashrc (ref. READ.md)
$ generate_N_bytes_random
[Enter number_of_bytes of random to generate: 50
Generating 5 random bytes
Output: e6136a68b30051330a9498817b2d431572959b2d43af90134d41e153ab45e28710f155fa79c05a9619ba8201a1eab8fbfbb1

Timestamping

Getting timestamp is important in some situations. Under [time.sh],

$ get_timestamp
e.g. Output: 2020–04–19_1827hr_55sec

Similar functionalities can be used to automate for file timestamping, e.g. in [files_n_folders.sh],

$ update_file_timestamp <file_name>e.g. $ update_file_timestamp x.zip filename 
x.zip is updated as x_2020-04-21_1819hr_28sec.zip

Utilities like in [time.sh]:

check_date_expiry: 
compares 2 given time and decides on expiration if 1st date occurs after the 1st. This can be useful when tooling to check for certificate expiration or contractual dates validity, etc.
get_time_in_epoch:
takes formatted time and returns…

--

--

Mi'kail Eli'yah
Mi'kail Eli'yah

No responses yet