在Python中是否有任何RFC4648(「Base16,Base32和Base64數據編碼」)的實現? 請注意,我特別尋找RFC 4648,而不是它的前身。其他腳本語言可能會工作,只要不需要太長時間。 Python是首選。RFC 4648(Base64)在Python中的實現
1
A
回答
3
1
Ruby在Base64#strict_decode64
和Base64#strict_encode64
方法中實現了RFC 4648。 Source.
0
有BASE64的字符串操作數版,以及:
a_str = 'This is a string'
a_str.encode('base64', 'strict')
'VGhpcyBpcyBhIHN0cmluZw==\n'
它確實一樣base64.b64encode但我想我會在那裏把它作爲一個選項。
補丁:
什麼你要找的是「擴展的十六進制」對,我記得我安裝了DNSSEC項目而回常規的base64模塊:http://bugs.python.org/issue16995
0
0
雖然與https://golang.org/src/encoding/base32/base32.go
工作,我是不是能找到什麼RFC 4648的Python實現是指爲「使用擴展的十六進制字母編碼的基址32「;所以我寫了一個爲Python:
https://gist.github.com/graham/d7845f00fce0690b65ab049d52c1ddcb
至於我可以告訴RFC 3548沒有什麼不同,如果你使用標準的字符映射表,但我沒能找到使用的標準方式擴展十六進制字母
隨意複製粘貼,我會寫一些測試,並創建一個git回購,如果人們認爲這是一個合理的解決方案。
相關問題
- 1. RFC 4648(Base [16,32,64])在Matlab中的實現
- 2. base64或base32編碼(RFC 4648)中的位組大小有什麼意義?
- 3. OO實現RFC 2445
- 4. 在python中的Rfc 1123
- 5. 在python中實現R表的實現
- 6. 如何在我的服務器中實現Websocket(RFC 6455)?
- 7. JQuery base64功能實現
- 8. Netcat在Python中的實現
- 9. Python-使用Python在Gurobi中實現TI的實現。 KeyError異常
- 10. 實現在Python
- 11. 在Python中實現OpenID
- 12. 在Python中實現WebdriverBackedSelenium
- 13. 在Python中實現SMPP
- 14. 在python中實現類
- 15. **如何在Python中實現?
- 16. 在python中實現RSA
- 17. wp.uploadFile xmlrpc python encode base64
- 18. 如何在Python中實現Haskell實例?
- 19. 在PHP網站中實現RFC 2369的「List-Unsubscribe」 - 我應該發送確認嗎?
- 20. Python中的base64編碼
- 21. Python中的矩陣實現
- 22. Python中的K-Means實現
- 23. Python中的樹實現
- 24. Python中的樹實現
- 25. Python中的PLSA實現
- 26. 在Python中實現語音激活的密碼實現
- 27. 尋找實現RRULE的JavaScript庫(iCalendar RFC 5545)
- 28. Python和RFC 3339時間戳
- 29. 在Python中的差異算法實現
- 30. 在python的擴展類中實現timeit()
這個問題太寬泛了(一個問題兩個)。我刪除了matlab標籤,因爲這裏已經有兩個Python的答案。請打開一個關於Matlab實現的新問題。 – kay 2012-07-25 22:17:47
不公平:(Python在這裏有更多的觀衆,因此更多的答案。爲什麼不讓OP決定刪除哪個標籤。我認真:) – Amro 2012-07-25 22:17:52
@Amro for you:http://stackoverflow.com/questions/11659710/rfc-4648-base16-32-64-implementation-in-matlab :) – kay 2012-07-25 22:36:36