BASE64软件包不可用。有替代品,以便我还是可以使用命令?

问题描述 投票:0回答:2
命令。但是,我需要运行一个使用

base64

/编码的脚本。 
有没有办法在脚本中的函数中执行此操作? 
	
well,En/Decode base64的容易性很容易取决于系统上安装的内容。

e.g。
linux bash base64 busybox
2个回答
2
投票

$ openssl enc -base64 <<< 'Hello, World!' SGVsbG8sIFdvcmxkIQo= $ openssl enc -base64 -d <<< SGVsbG8sIFdvcmxkIQo= Hello, World!

1980年以来,这已可以使用Https://en.wikipedia.org/wiki/uuencoding

Busybox具有
Https://www.busybox.net/downloads/busybox.html#ueencode
具有base64支持:

0
投票
uuencode [-m] [infile] stored_filename Uuencode a file to stdout Options: -m Use base64 encoding per RFC1521

us示例: $ echo 'foo' | uuencode -m - begin-base64 644 - Zm9vCg== ====

使用其他工具确认它是正确的: $ echo 'foo' | b64encode - begin-base64 644 - Zm9vCg== ==== $ python3 -c 'import base64; print(base64.b64encode(b"foo\n"))' b'Zm9vCg=='

	

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.