diff --git a/mobile/ios/Classes/OTPAuthURL.m b/mobile/ios/Classes/OTPAuthURL.m index ec93b63..e9d93ba 100644 --- a/mobile/ios/Classes/OTPAuthURL.m +++ b/mobile/ios/Classes/OTPAuthURL.m @@ -186,6 +186,8 @@ + (NSData *)base32Decode:(NSString *)string { [GTMStringEncoding stringEncodingWithString:kBase32Charset]; [coder addDecodeSynonyms:kBase32Synonyms]; [coder ignoreCharacters:kBase32Sep]; + [coder setPaddingChar:'='] + [coder setDoPad:YES]; return [coder decode:string]; } @@ -194,6 +196,8 @@ + (NSString *)encodeBase32:(NSData *)data { [GTMStringEncoding stringEncodingWithString:kBase32Charset]; [coder addDecodeSynonyms:kBase32Synonyms]; [coder ignoreCharacters:kBase32Sep]; + [coder setPaddingChar:'='] + [coder setDoPad:YES]; return [coder encode:data]; }