fscrypt: clean up base64 encoding/decoding
authorEric Biggers <ebiggers@google.com>
Wed, 24 Jul 2019 18:07:58 +0000 (11:07 -0700)
committerEric Biggers <ebiggers@google.com>
Tue, 13 Aug 2019 02:04:44 +0000 (19:04 -0700)
commit1c5100a2aab4143f36ca671c28189a8734d5381a
tree6ef8a4ddd144f97d0d4dd3b61fef21912dfb4d4b
parent75798f85f2badb04074cc909dbbb93072f4041ff
fscrypt: clean up base64 encoding/decoding

Some minor cleanups for the code that base64 encodes and decodes
encrypted filenames and long name digests:

- Rename "digest_{encode,decode}()" => "base64_{encode,decode}()" since
  they are used for filenames too, not just for long name digests.
- Replace 'while' loops with more conventional 'for' loops.
- Use 'u8' for binary data.  Keep 'char' for string data.
- Fully constify the lookup table (pointer was not const).
- Improve comment.

No actual change in behavior.

Signed-off-by: Eric Biggers <ebiggers@google.com>
fs/crypto/fname.c