OLD | NEW |
1 /* | 1 /* |
2 * blapi.h - public prototypes for the freebl library | 2 * blapi.h - public prototypes for the freebl library |
3 * | 3 * |
4 * This Source Code Form is subject to the terms of the Mozilla Public | 4 * This Source Code Form is subject to the terms of the Mozilla Public |
5 * License, v. 2.0. If a copy of the MPL was not distributed with this | 5 * License, v. 2.0. If a copy of the MPL was not distributed with this |
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
7 | 7 |
8 #ifndef _BLAPI_H_ | 8 #ifndef _BLAPI_H_ |
9 #define _BLAPI_H_ | 9 #define _BLAPI_H_ |
10 | 10 |
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
979 ** "maxOutputLen" the maximum amount of data that can ever be | 979 ** "maxOutputLen" the maximum amount of data that can ever be |
980 ** stored in "output" | 980 ** stored in "output" |
981 ** "input" the input data | 981 ** "input" the input data |
982 ** "inputLen" the amount of input data | 982 ** "inputLen" the amount of input data |
983 */ | 983 */ |
984 extern SECStatus· | 984 extern SECStatus· |
985 Camellia_Decrypt(CamelliaContext *cx, unsigned char *output, | 985 Camellia_Decrypt(CamelliaContext *cx, unsigned char *output, |
986 unsigned int *outputLen, unsigned int maxOutputLen, | 986 unsigned int *outputLen, unsigned int maxOutputLen, |
987 const unsigned char *input, unsigned int inputLen); | 987 const unsigned char *input, unsigned int inputLen); |
988 | 988 |
| 989 /******************************************/ |
| 990 /* |
| 991 ** ChaCha20+Poly1305 AEAD |
| 992 */ |
| 993 |
| 994 extern SECStatus ChaCha20Poly1305_InitContext(ChaCha20Poly1305Context *ctx, |
| 995 const unsigned char *key, |
| 996 unsigned int keyLen, |
| 997 unsigned int tagLen); |
| 998 |
| 999 extern ChaCha20Poly1305Context *ChaCha20Poly1305_CreateContext( |
| 1000 const unsigned char *key, unsigned int keyLen, unsigned int tagLen); |
| 1001 |
| 1002 extern void ChaCha20Poly1305_DestroyContext(ChaCha20Poly1305Context *ctx, |
| 1003 PRBool freeit); |
| 1004 |
| 1005 extern SECStatus ChaCha20Poly1305_Seal( |
| 1006 const ChaCha20Poly1305Context *ctx, unsigned char *output, |
| 1007 unsigned int *outputLen, unsigned int maxOutputLen, |
| 1008 const unsigned char *input, unsigned int inputLen, |
| 1009 const unsigned char *nonce, unsigned int nonceLen, |
| 1010 const unsigned char *ad, unsigned int adLen); |
| 1011 |
| 1012 extern SECStatus ChaCha20Poly1305_Open( |
| 1013 const ChaCha20Poly1305Context *ctx, unsigned char *output, |
| 1014 unsigned int *outputLen, unsigned int maxOutputLen, |
| 1015 const unsigned char *input, unsigned int inputLen, |
| 1016 const unsigned char *nonce, unsigned int nonceLen, |
| 1017 const unsigned char *ad, unsigned int adLen); |
989 | 1018 |
990 /******************************************/ | 1019 /******************************************/ |
991 /* | 1020 /* |
992 ** MD5 secure hash function | 1021 ** MD5 secure hash function |
993 */ | 1022 */ |
994 | 1023 |
995 /* | 1024 /* |
996 ** Hash a null terminated string "src" into "dest" using MD5 | 1025 ** Hash a null terminated string "src" into "dest" using MD5 |
997 */ | 1026 */ |
998 extern SECStatus MD5_Hash(unsigned char *dest, const char *src); | 1027 extern SECStatus MD5_Hash(unsigned char *dest, const char *src); |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1584 const SECItem *encodedParams, ECParams *params); | 1613 const SECItem *encodedParams, ECParams *params); |
1585 extern SECStatus EC_DecodeParams(const SECItem *encodedParams, | 1614 extern SECStatus EC_DecodeParams(const SECItem *encodedParams, |
1586 ECParams **ecparams); | 1615 ECParams **ecparams); |
1587 extern SECStatus EC_CopyParams(PLArenaPool *arena, ECParams *dstParams, | 1616 extern SECStatus EC_CopyParams(PLArenaPool *arena, ECParams *dstParams, |
1588 const ECParams *srcParams); | 1617 const ECParams *srcParams); |
1589 #endif | 1618 #endif |
1590 | 1619 |
1591 SEC_END_PROTOS | 1620 SEC_END_PROTOS |
1592 | 1621 |
1593 #endif /* _BLAPI_H_ */ | 1622 #endif /* _BLAPI_H_ */ |
OLD | NEW |