問題タブ [nacl-cryptography]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
python - Python を使用して nacl SigningKey の公開鍵と秘密鍵をプレーン テキストとして保存する方法は?
nacl docsに何かが欠けているに違いありません。秘密鍵と公開鍵の両方をプレーン テキストで保存するにはどうすればよいですか? 使用可能なエンコーダーは、Raw (バイナリー?)、Hex、Base16/32/64、および URLSafeBase64Encoder です。
base64
このライブラリを使用して、Base64 でエンコードされたキーを変換するだけだと思っていました。
例:
結果: Bytes オブジェクト
試した:
- ここの
Decoding Strings with Python
チュートリアル、およびあらゆる種類のバリエーション。 - それらのいずれも、プレーンテキストバージョンの
SigningKey
-----BEGIN OPENSSH PRIVATE KEY-----
などをプレーンテキストで探していますb64decode
関数にプレーンテキストを表示させるにはどうすればよいですか?