[wesnoth-commits] [wesnoth/wesnoth] 0ed7ff: Factor out base64 and crypt {en, de}coding

GitHub noreply at github.com
Fri Mar 16 14:44:42 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 0ed7ff100a00bb837df7060a0f18e101e6ded0ae
      https://github.com/wesnoth/wesnoth/commit/0ed7ff100a00bb837df7060a0f18e101e6ded0ae
  Author: Alexander van Gessel <ai0867 at gmail.com>
  Date:   2018-03-16 (Fri, 16 Mar 2018)

  Changed paths:
    M source_lists/libwesnoth_core
    M src/campaign_server/campaign_server.cpp
    M src/hash.cpp
    M src/image.cpp
    A src/serialization/base64.cpp
    A src/serialization/base64.hpp
    M src/serialization/string_view.hpp

  Log Message:
  -----------
  Factor out base64 and crypt {en,de}coding

Base64 according to RFC4648.
Crypt64 is whatever crypt() does.

The two radix-64 encodings share less code than I would like,
because base64 is stream-oriented and therefore big-endian,
while crypt is little-endian.


  Commit: b753b33239cbdd89cc4173f7cdf1d623d6fe01fe
      https://github.com/wesnoth/wesnoth/commit/b753b33239cbdd89cc4173f7cdf1d623d6fe01fe
  Author: Alexander van Gessel <ai0867 at gmail.com>
  Date:   2018-03-16 (Fri, 16 Mar 2018)

  Changed paths:
    M src/tests/test_serialization.cpp

  Log Message:
  -----------
  Add unit tests for base64 and crypt64


  Commit: 9932ed09995af3c8b2a280b3995876ea8db29df7
      https://github.com/wesnoth/wesnoth/commit/9932ed09995af3c8b2a280b3995876ea8db29df7
  Author: Alexander van Gessel <ai0867 at gmail.com>
  Date:   2018-03-16 (Fri, 16 Mar 2018)

  Changed paths:
    M src/server/user_handler.cpp

  Log Message:
  -----------
  Use common crypt64::encode in server


  Commit: 4e11f6b46f18d494d92fb2d322c23ef56d058b88
      https://github.com/wesnoth/wesnoth/commit/4e11f6b46f18d494d92fb2d322c23ef56d058b88
  Author: Alexander van Gessel <ai0867 at gmail.com>
  Date:   2018-03-16 (Fri, 16 Mar 2018)

  Changed paths:
    M src/server/user_handler.cpp

  Log Message:
  -----------
  Switch to standard base64

The exact format is unimportant, what matters is that the nonce contains
enough entropy. Crypt64 was originally chosen because it was used elsewhere.
Raw bytes would also work, but would be less readable if inspected manually.


  Commit: 0f3d1c4a36effb0f138fc1a83f769ccea51ec32c
      https://github.com/wesnoth/wesnoth/commit/0f3d1c4a36effb0f138fc1a83f769ccea51ec32c
  Author: Alexander van Gessel <AI0867 at gmail.com>
  Date:   2018-03-16 (Fri, 16 Mar 2018)

  Changed paths:
    M source_lists/libwesnoth_core
    M src/campaign_server/campaign_server.cpp
    M src/hash.cpp
    M src/image.cpp
    A src/serialization/base64.cpp
    A src/serialization/base64.hpp
    M src/serialization/string_view.hpp
    M src/server/user_handler.cpp
    M src/tests/test_serialization.cpp

  Log Message:
  -----------
  Merge pull request #2647 from AI0867/base64-refactor

Base64 refactor


Compare: https://github.com/wesnoth/wesnoth/compare/6a175d1bbc30...0f3d1c4a36ef


More information about the Commits mailing list