Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[POSIX準拠] $RANDOM を OpenSSL で代替 #49

Closed
KEINOS opened this issue Jun 6, 2021 · 1 comment
Closed

[POSIX準拠] $RANDOM を OpenSSL で代替 #49

KEINOS opened this issue Jun 6, 2021 · 1 comment
Assignees
Labels
POSIX POSIX 準拠に関する系

Comments

@KEINOS
Copy link
Member

KEINOS commented Jun 6, 2021

そうね代替ねぇ〜♪

QiiCipher/bin/check

Lines 22 to 28 in b90eaa7

md5r() {
if [ -e md5sum ]; then
printf "%s" $RANDOM | md5sum
elif [ -e md5 ]; then
md5 -q -s $RANDOM
fi
}

上記 md5r() で使われている $RANDOM は POSIX 環境では定義されないので、必須である openssl にまかせてしまおうというリファクタです。

下記、参考先にサンプルとテストがあるので、流用してください。

@KEINOS KEINOS added the POSIX POSIX 準拠に関する系 label Jun 6, 2021
@yoshi389111 yoshi389111 self-assigned this Jun 9, 2021
@yoshi389111
Copy link
Collaborator

#53 で対応したのでクローズします

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
POSIX POSIX 準拠に関する系
Projects
None yet
Development

No branches or pull requests

2 participants