| OLD | NEW |
| 1 /* | 1 /* |
| 2 * crypto.h - public data structures and prototypes for the crypto library | 2 * crypto.h - public data structures and prototypes for the crypto 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 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 ** "maxOutputLen" the maximum amount of data that can ever be | 811 ** "maxOutputLen" the maximum amount of data that can ever be |
| 812 ** stored in "output" | 812 ** stored in "output" |
| 813 ** "input" the input data | 813 ** "input" the input data |
| 814 ** "inputLen" the amount of input data | 814 ** "inputLen" the amount of input data |
| 815 */ | 815 */ |
| 816 extern SECStatus | 816 extern SECStatus |
| 817 Camellia_Decrypt(CamelliaContext *cx, unsigned char *output, | 817 Camellia_Decrypt(CamelliaContext *cx, unsigned char *output, |
| 818 unsigned int *outputLen, unsigned int maxOutputLen, | 818 unsigned int *outputLen, unsigned int maxOutputLen, |
| 819 const unsigned char *input, unsigned int inputLen); | 819 const unsigned char *input, unsigned int inputLen); |
| 820 | 820 |
| 821 /******************************************/ |
| 822 /* |
| 823 ** ChaCha20+Poly1305 AEAD |
| 824 */ |
| 825 |
| 826 extern SECStatus ChaCha20Poly1305_Seal( |
| 827 unsigned char *out, |
| 828 const unsigned char *ad, size_t adLen, |
| 829 const unsigned char *plaintext, size_t plaintextLen, |
| 830 size_t tagLen, |
| 831 const unsigned char key[32], |
| 832 const unsigned char nonce[8]); |
| 833 |
| 834 extern SECStatus ChaCha20Poly1305_Open( |
| 835 unsigned char *out, |
| 836 const unsigned char *ad, size_t adLen, |
| 837 const unsigned char *ciphertext, size_t ciphertextLen, |
| 838 size_t tagLen, |
| 839 const unsigned char key[32], |
| 840 const unsigned char nonce[8]); |
| 821 | 841 |
| 822 /******************************************/ | 842 /******************************************/ |
| 823 /* | 843 /* |
| 824 ** MD5 secure hash function | 844 ** MD5 secure hash function |
| 825 */ | 845 */ |
| 826 | 846 |
| 827 /* | 847 /* |
| 828 ** Hash a null terminated string "src" into "dest" using MD5 | 848 ** Hash a null terminated string "src" into "dest" using MD5 |
| 829 */ | 849 */ |
| 830 extern SECStatus MD5_Hash(unsigned char *dest, const char *src); | 850 extern SECStatus MD5_Hash(unsigned char *dest, const char *src); |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1404 PRBool BLAPI_VerifySelf(const char *name); | 1424 PRBool BLAPI_VerifySelf(const char *name); |
| 1405 | 1425 |
| 1406 /*********************************************************************/ | 1426 /*********************************************************************/ |
| 1407 extern const SECHashObject * HASH_GetRawHashObject(HASH_HashType hashType); | 1427 extern const SECHashObject * HASH_GetRawHashObject(HASH_HashType hashType); |
| 1408 | 1428 |
| 1409 extern void BL_SetForkState(PRBool forked); | 1429 extern void BL_SetForkState(PRBool forked); |
| 1410 | 1430 |
| 1411 SEC_END_PROTOS | 1431 SEC_END_PROTOS |
| 1412 | 1432 |
| 1413 #endif /* _BLAPI_H_ */ | 1433 #endif /* _BLAPI_H_ */ |
| OLD | NEW |