| /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ |
| /* |
| * drivers/amlogic/media/enhancement/amvecm/util/base64.h |
| * |
| * Copyright (C) 2017 Amlogic, Inc. All rights reserved. |
| * |
| * This program is free software; you can redistribute it and/or modify |
| * it under the terms of the GNU General Public License as published by |
| * the Free Software Foundation; either version 2 of the License, or |
| * (at your option) any later version. |
| * |
| * This program is distributed in the hope that it will be useful, but WITHOUT |
| * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
| * more details. |
| * |
| */ |
| |
| #ifndef BASE64_H |
| #define BASE64_H |
| |
| /* |
| * out is null-terminated encode string. |
| * return values is out length, exclusive terminating `\0' |
| */ |
| unsigned long base64_encode(unsigned char *in, |
| unsigned int inlen, |
| char *out); |
| |
| /* |
| * return values is out length |
| */ |
| unsigned long base64_decode(char *in, unsigned int inlen, |
| unsigned char *out); |
| |
| #endif /* BASE64_H */ |