GTLRBase64.h 1.1 KB

1234567891011121314151617181920212223242526272829
  1. /* Copyright (c) 2012 Google Inc.
  2. *
  3. * Licensed under the Apache License, Version 2.0 (the "License");
  4. * you may not use this file except in compliance with the License.
  5. * You may obtain a copy of the License at
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. *
  9. * Unless required by applicable law or agreed to in writing, software
  10. * distributed under the License is distributed on an "AS IS" BASIS,
  11. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. * See the License for the specific language governing permissions and
  13. * limitations under the License.
  14. */
  15. #import <Foundation/Foundation.h>
  16. NS_ASSUME_NONNULL_BEGIN
  17. NSData * _Nullable GTLRDecodeBase64(NSString * _Nullable base64Str);
  18. NSString * _Nullable GTLREncodeBase64(NSData * _Nullable data);
  19. // "Web-safe" encoding substitutes - and _ for + and / in the encoding table,
  20. // per http://www.ietf.org/rfc/rfc4648.txt section 5.
  21. NSData * _Nullable GTLRDecodeWebSafeBase64(NSString * _Nullable base64Str);
  22. NSString * _Nullable GTLREncodeWebSafeBase64(NSData * _Nullable data);
  23. NS_ASSUME_NONNULL_END