【问题标题】:base64 package not available. Is there a substitute so I can use the command anyway?base64 包不可用。是否有替代品,所以我仍然可以使用该命令?
【发布时间】:2013-12-12 09:20:51
【问题描述】:

我在一个无法安装任何软件包的系统上,并且我的 busybox 不包含base64 命令。但是我需要运行一个使用base64 de/encoding 的脚本。 有没有办法在脚本中的函数中做到这一点?

【问题讨论】:

    标签: linux bash base64 busybox


    【解决方案1】:

    嗯,编码/解码 base64 的难易程度实际上取决于您的系统上安装了什么

    例如openssl can encode and decode base64:

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

    【讨论】:

    • 不幸的是我的系统没有openssl。只有openssl_genrsaopenssl_req(这是一个fritzbox 路由器)
    猜你喜欢
    • 1970-01-01
    • 2019-08-24
    • 1970-01-01
    • 2010-12-19
    • 2021-09-07
    • 1970-01-01
    • 1970-01-01
    • 2021-07-31
    • 2017-07-03
    相关资源
    最近更新 更多