diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-11-25 23:08:24 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-11-25 23:08:24 +0900 |
| commit | d0b6a88f9c2eeea46ea4a8d2fd769b45d138185d (patch) | |
| tree | 2e8374acac38aea5d470325f36f5a433f47c0e91 /src | |
| parent | 432675e51292754aa15f04d448397e9d06986856 (diff) | |
Base32 decode lowercased characters as well
Diffstat (limited to 'src')
| -rw-r--r-- | src/base32.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/base32.h b/src/base32.h index a93f9180..203bb8b9 100644 --- a/src/base32.h +++ b/src/base32.h @@ -64,6 +64,8 @@ std::string decode(InputIterator first, InputIterator last) unsigned char value; if('A' <= ch && ch <= 'Z') { value = ch-'A'; + } else if('a' <= ch && ch <= 'z') { + value = ch-'a'; } else if('2' <= ch && ch <= '7') { value = ch-'2'+26; } else if(ch == '=') { |
