Openbsd.Base64 1.4 KB

1234567891011121314151617
  1. version=pmwiki-2.2.130 ordered=1 urlencoded=1
  2. agent=Mozilla/5.0 (X11; OpenBSD amd64; rv:82.0) Gecko/20100101 Firefox/82.0
  3. author=jrmu
  4. charset=UTF-8
  5. csum=
  6. ctime=1612247857
  7. host=198.251.81.119
  8. name=Openbsd.Base64
  9. rev=1
  10. targets=
  11. text=(:title Base64 Encoding:)%0a%0aThere are two easy ways to base64 encode a string. You can use [[https://man.openbsd.org/b64encode|b64encode]]:%0a%0a[@%0a$ b64encode randomname%0abegin-base64 644 test%0arandomstring%0acmFuZG9tc3RyaW5n%0a@]%0a%0aOr you can use this perl one-liner:%0a%0a[@%0aperl -MMIME::Base64 -e 'print encode_base64("randomstring");'%0acmFuZG9tc3RyaW5n%0a@]%0a%0aTo decode a base64 string, you can use [[https://man.openbsd.org/b64decode|b64decode]]:
  12. time=1612247857
  13. title=Base64 Encoding
  14. author:1612247857=jrmu
  15. diff:1612247857:1612247857:=1,19d0%0a%3c (:title Base64 Encoding:)%0a%3c %0a%3c There are two easy ways to base64 encode a string. You can use [[https://man.openbsd.org/b64encode|b64encode]]:%0a%3c %0a%3c [@%0a%3c $ b64encode randomname%0a%3c begin-base64 644 test%0a%3c randomstring%0a%3c cmFuZG9tc3RyaW5n%0a%3c @]%0a%3c %0a%3c Or you can use this perl one-liner:%0a%3c %0a%3c [@%0a%3c perl -MMIME::Base64 -e 'print encode_base64("randomstring");'%0a%3c cmFuZG9tc3RyaW5n%0a%3c @]%0a%3c %0a%3c To decode a base64 string, you can use [[https://man.openbsd.org/b64decode|b64decode]]:%0a\ No newline at end of file%0a
  16. host:1612247857=198.251.81.119