Home
last modified time | relevance | path

Searched refs:HcfResult (Results 1 – 25 of 120) sorted by relevance

12345

/base/security/crypto_framework/interfaces/innerkits/crypto_operation/
Dsignature.h38 HcfResult (*init)(HcfSign *self, HcfParamsSpec *params, HcfPriKey *privateKey);
40 HcfResult (*update)(HcfSign *self, HcfBlob *data);
42 HcfResult (*sign)(HcfSign *self, HcfBlob *data, HcfBlob *returnSignatureData);
46 HcfResult (*setSignSpecInt)(HcfSign *self, SignSpecItem item, int32_t saltLen);
48 HcfResult (*getSignSpecString)(HcfSign *self, SignSpecItem item, char **returnString);
50 HcfResult (*getSignSpecInt)(HcfSign *self, SignSpecItem item, int32_t *returnInt);
58 HcfResult (*init)(HcfVerify *self, HcfParamsSpec *params, HcfPubKey *publicKey);
60 HcfResult (*update)(HcfVerify *self, HcfBlob *data);
66 HcfResult (*setVerifySpecInt)(HcfVerify *self, SignSpecItem item, int32_t saltLen);
68 HcfResult (*getVerifySpecString)(HcfVerify *self, SignSpecItem item, char **returnString);
[all …]
Dcipher.h57 HcfResult (*init)(HcfCipher *self, enum HcfCryptoMode opMode,
60 HcfResult (*update)(HcfCipher *self, HcfBlob *input, HcfBlob *output);
62 HcfResult (*doFinal)(HcfCipher *self, HcfBlob *input, HcfBlob *output);
66 HcfResult (*setCipherSpecUint8Array)(HcfCipher *self, CipherSpecItem item, HcfBlob pSource);
68 HcfResult (*getCipherSpecString)(HcfCipher *self, CipherSpecItem item, char **returnString);
70HcfResult (*getCipherSpecUint8Array)(HcfCipher *self, CipherSpecItem item, HcfBlob *returnUint8Arr…
86 HcfResult HcfCipherCreate(const char *transformation, HcfCipher **returnObj);
Dmac.h30 HcfResult (*init)(HcfMac *self, const HcfSymKey *key);
32 HcfResult (*update)(HcfMac *self, HcfBlob *input);
34 HcfResult (*doFinal)(HcfMac *self, HcfBlob *output);
45 HcfResult HcfMacCreate(const char *algoName, HcfMac **mac);
Drand.h32 HcfResult (*generateRandom)(HcfRand *self, int32_t numBytes, HcfBlob *random);
34 HcfResult (*setSeed)(HcfRand *self, HcfBlob *seed);
41 HcfResult HcfRandCreate(HcfRand **random);
Dmd.h28 HcfResult (*update)(HcfMd *self, HcfBlob *input);
30 HcfResult (*doFinal)(HcfMd *self, HcfBlob *output);
41 HcfResult HcfMdCreate(const char *algoName, HcfMd **md);
/base/security/crypto_framework/frameworks/spi/
Dsignature_spi.h35 HcfResult (*engineInit)(HcfSignSpi *self, HcfParamsSpec *params, HcfPriKey *privateKey);
37 HcfResult (*engineUpdate)(HcfSignSpi *self, HcfBlob *data);
39 HcfResult (*engineSign)(HcfSignSpi *self, HcfBlob *data, HcfBlob *returnSignatureData);
41 HcfResult (*engineSetSignSpecInt)(HcfSignSpi *self, SignSpecItem item, int32_t saltLen);
43 HcfResult (*engineGetSignSpecString)(HcfSignSpi *self, SignSpecItem item, char **returnString);
45 HcfResult (*engineGetSignSpecInt)(HcfSignSpi *self, SignSpecItem item, int32_t *returnInt);
53 HcfResult (*engineInit)(HcfVerifySpi *self, HcfParamsSpec *params, HcfPubKey *publicKey);
55 HcfResult (*engineUpdate)(HcfVerifySpi *self, HcfBlob *data);
59 HcfResult (*engineSetVerifySpecInt)(HcfVerifySpi *self, SignSpecItem item, int32_t saltLen);
61HcfResult (*engineGetVerifySpecString)(HcfVerifySpi *self, SignSpecItem item, char **returnString);
[all …]
Dcipher_factory_spi.h32 HcfResult (*init)(HcfCipherGeneratorSpi *self, enum HcfCryptoMode opMode,
35 HcfResult (*update)(HcfCipherGeneratorSpi *self, HcfBlob *input, HcfBlob *output);
37 HcfResult (*doFinal)(HcfCipherGeneratorSpi *self, HcfBlob *input, HcfBlob *output);
39HcfResult (*setCipherSpecUint8Array)(HcfCipherGeneratorSpi *self, CipherSpecItem item, HcfBlob pSo…
41HcfResult (*getCipherSpecString)(HcfCipherGeneratorSpi *self, CipherSpecItem item, char **returnSt…
43HcfResult (*getCipherSpecUint8Array)(HcfCipherGeneratorSpi *self, CipherSpecItem item, HcfBlob *re…
Dasy_key_generator_spi.h40 HcfResult (*engineGenerateKeyPair)(HcfAsyKeyGeneratorSpi *self, HcfKeyPair **returnObj);
42HcfResult (*engineConvertKey)(HcfAsyKeyGeneratorSpi *self, HcfParamsSpec *params, HcfBlob *pubKeyB…
45HcfResult (*engineGenerateKeyPairBySpec)(const HcfAsyKeyGeneratorSpi *self, const HcfAsyKeyParamsS…
48HcfResult (*engineGeneratePubKeyBySpec)(const HcfAsyKeyGeneratorSpi *self, const HcfAsyKeyParamsSp…
51HcfResult (*engineGeneratePriKeyBySpec)(const HcfAsyKeyGeneratorSpi *self, const HcfAsyKeyParamsSp…
Dmac_spi.h28 HcfResult (*engineInitMac)(HcfMacSpi *self, const HcfSymKey *key);
30 HcfResult (*engineUpdateMac)(HcfMacSpi *self, HcfBlob *input);
32 HcfResult (*engineDoFinalMac)(HcfMacSpi *self, HcfBlob *output);
/base/security/crypto_framework/plugin/openssl_plugin/common/inc/
Dopenssl_common.h43 HcfResult GetOpensslCurveId(int32_t keyLen, int32_t *returnCurveId);
44 HcfResult GetOpensslDigestAlg(uint32_t alg, EVP_MD **digestAlg);
47 HcfResult GetOpensslPadding(int32_t padding, int32_t *opensslPadding);
53 HcfResult BigIntegerToBigNum(const HcfBigInteger *src, BIGNUM **dest);
55 HcfResult BigNumToBigInteger(const BIGNUM *src, HcfBigInteger *dest);
57 HcfResult GetRsaSpecStringMd(const HcfAlgParaValue md, char **returnString);
59 HcfResult GetRsaSpecStringMGF(char **returnString);
/base/security/crypto_framework/interfaces/innerkits/key/
Dasy_key_generator.h53 HcfResult (*generateKeyPair)(HcfAsyKeyGenerator *self, HcfParamsSpec *params,
56 HcfResult (*convertKey)(HcfAsyKeyGenerator *self, HcfParamsSpec *params, HcfBlob *pubKeyBlob,
67 HcfResult (*generateKeyPair)(const HcfAsyKeyGeneratorBySpec *self, HcfKeyPair **returnKeyPair);
69 HcfResult (*generatePubKey)(const HcfAsyKeyGeneratorBySpec *self, HcfPubKey **returnPubKey);
71 HcfResult (*generatePriKey)(const HcfAsyKeyGeneratorBySpec *self, HcfPriKey **returnPriKey);
80 HcfResult HcfAsyKeyGeneratorCreate(const char *algoName, HcfAsyKeyGenerator **returnObj);
82 HcfResult HcfAsyKeyGeneratorBySpecCreate(const HcfAsyKeyParamsSpec *paramsSpec, HcfAsyKeyGeneratorB…
Dpub_key.h27 HcfResult (*getAsyKeySpecBigInteger)(const HcfPubKey *self, const AsyKeySpecItem item,
30HcfResult (*getAsyKeySpecString)(const HcfPubKey *self, const AsyKeySpecItem item, char **returnSt…
32 HcfResult (*getAsyKeySpecInt)(const HcfPubKey *self, const AsyKeySpecItem item, int *returnInt);
Dsym_key_generator.h41 HcfResult (*generateSymKey)(HcfSymKeyGenerator *self, HcfSymKey **symKey);
44 HcfResult (*convertSymKey)(HcfSymKeyGenerator *self, const HcfBlob *key, HcfSymKey **symKey);
63 HcfResult HcfSymKeyGeneratorCreate(const char *algoName, HcfSymKeyGenerator **returnObj);
Dpri_key.h27 HcfResult (*getAsyKeySpecBigInteger)(const HcfPriKey *self, const AsyKeySpecItem item,
30HcfResult (*getAsyKeySpecString)(const HcfPriKey *self, const AsyKeySpecItem item, char **returnSt…
32 HcfResult (*getAsyKeySpecInt)(const HcfPriKey *self, const AsyKeySpecItem item, int *returnInt);
/base/security/crypto_framework/plugin/openssl_plugin/key/asy_key_generator/src/
Decc_asy_key_generator_openssl.c45 static HcfResult NewEcKeyPair(int32_t curveId, EC_KEY **returnEcKey) in NewEcKeyPair()
74 static HcfResult CheckEc224CurveId(BIGNUM *p, BIGNUM *b, BIGNUM *x, BIGNUM *y) in CheckEc224CurveId()
96 static HcfResult CheckEc256CurveId(BIGNUM *p, BIGNUM *b, BIGNUM *x, BIGNUM *y) in CheckEc256CurveId()
118 static HcfResult CheckEc384CurveId(BIGNUM *p, BIGNUM *b, BIGNUM *x, BIGNUM *y) in CheckEc384CurveId()
140 static HcfResult CheckEc521CurveId(BIGNUM *p, BIGNUM *b, BIGNUM *x, BIGNUM *y) in CheckEc521CurveId()
162 static HcfResult CheckParamsSpecToGetCurveId(const HcfEccCommParamsSpec *ecParams, int32_t *curveId) in CheckParamsSpecToGetCurveId()
176 HcfResult res = HCF_INVALID_PARAMS; in CheckParamsSpecToGetCurveId()
210 static HcfResult NewGroupFromCurveGFp(const HcfEccCommParamsSpec *ecParams, EC_GROUP **ecGroup, BN_… in NewGroupFromCurveGFp()
212 HcfResult res = HCF_SUCCESS; in NewGroupFromCurveGFp()
243 static HcfResult SetEcPointToGroup(const HcfEccCommParamsSpec *ecParams, EC_GROUP *group, BN_CTX *c… in SetEcPointToGroup()
[all …]
Ddsa_asy_key_generator_openssl.c166 static HcfResult GetDsaPubKeyEncoded(HcfKey *self, HcfBlob *returnBlob) in GetDsaPubKeyEncoded()
188 static HcfResult GetDsaPriKeyEncoded(HcfKey *self, HcfBlob *returnBlob) in GetDsaPriKeyEncoded()
234 static HcfResult GetBigIntegerSpecFromDsaPubKey(const HcfPubKey *self, const AsyKeySpecItem item, in GetBigIntegerSpecFromDsaPubKey()
245 HcfResult ret = HCF_SUCCESS; in GetBigIntegerSpecFromDsaPubKey()
272 static HcfResult GetBigIntegerSpecFromDsaPriKey(const HcfPriKey *self, const AsyKeySpecItem item, in GetBigIntegerSpecFromDsaPriKey()
283 HcfResult ret = HCF_SUCCESS; in GetBigIntegerSpecFromDsaPriKey()
310 static HcfResult GetIntSpecFromDsaPubKey(const HcfPubKey *self, const AsyKeySpecItem item, int *ret… in GetIntSpecFromDsaPubKey()
317 static HcfResult GetIntSpecFromDsaPriKey(const HcfPriKey *self, const AsyKeySpecItem item, int *ret… in GetIntSpecFromDsaPriKey()
324 static HcfResult GetStrSpecFromDsaPubKey(const HcfPubKey *self, const AsyKeySpecItem item, char **r… in GetStrSpecFromDsaPubKey()
331 static HcfResult GetStrSpecFromDsaPriKey(const HcfPriKey *self, const AsyKeySpecItem item, char **r… in GetStrSpecFromDsaPriKey()
[all …]
Drsa_asy_key_generator_openssl.c71 static HcfResult CheckRsaKeyGenParams(HcfAsyKeyGenSpiRsaParams *params) in CheckRsaKeyGenParams()
121 static HcfResult GetRsaPubKeySpecString(const HcfPubKey *self, const AsyKeySpecItem item, in GetRsaPubKeySpecString()
130 static HcfResult GetRsaPubKeySpecInt(const HcfPubKey *self, const AsyKeySpecItem item, in GetRsaPubKeySpecInt()
139 static HcfResult GetRsaPriKeySpecString(const HcfPriKey *self, const AsyKeySpecItem item, in GetRsaPriKeySpecString()
148 static HcfResult GetRsaPriKeySpecInt(const HcfPriKey *self, const AsyKeySpecItem item, in GetRsaPriKeySpecInt()
157 static HcfResult GetRsaPriKeySpecBigInteger(const HcfPriKey *self, const AsyKeySpecItem item, in GetRsaPriKeySpecBigInteger()
169 HcfResult ret = HCF_INVALID_PARAMS; in GetRsaPriKeySpecBigInteger()
199 static HcfResult GetRsaPubKeySpecBigInteger(const HcfPubKey *self, const AsyKeySpecItem item, in GetRsaPubKeySpecBigInteger()
211 HcfResult ret = HCF_INVALID_PARAMS; in GetRsaPubKeySpecBigInteger()
296 static HcfResult CopyMemFromBIO(BIO *bio, HcfBlob *outBlob) in CopyMemFromBIO()
[all …]
/base/security/crypto_framework/test/unittest/src/
Dcrypto_md_sm3_test.cpp53 HcfResult ret = HcfMdCreate("SM3", nullptr);
61 HcfResult ret = HcfMdCreate("SM3", &mdObj);
71 HcfResult ret = HcfMdCreate("SM3", &mdObj);
85 HcfResult ret = HcfMdCreate("SM3", &mdObj);
99 HcfResult ret = HcfMdCreate("SM3", &mdObj);
116 HcfResult ret = HcfMdCreate("SM3", &mdObj);
132 HcfResult ret = HcfMdCreate("SM3", &mdObj);
153 HcfResult ret = HcfMdCreate("SM3", &mdObj);
165 HcfResult ret = HcfMdCreate("SM3", &mdObj);
187 HcfResult ret = OpensslMdSpiCreate("SM3", &spiObj);
[all …]
Dcrypto_rand_test.cpp56 HcfResult ret = HcfRandCreate(nullptr);
64 HcfResult ret = HcfRandCreate(&randObj);
80 HcfResult ret = HcfRandCreate(&randObj);
98 HcfResult ret = HcfRandCreate(&randObj);
115 HcfResult ret = HcfRandCreate(&randObj);
130 HcfResult ret = HcfRandCreate(&randObj);
151 HcfResult ret = HcfRandCreate(&randObj);
175 HcfResult ret = HcfRandSpiCreate(nullptr);
182 HcfResult ret = HcfRandCreate(&randObj);
195 HcfResult ret = HcfRandCreate(&randObj);
[all …]
Dcrypto_dsa_verify_test.cpp43 HcfResult ret = HcfVerifyCreate("DSA2048|NoHash", &verify);
56 HcfResult ret = HcfVerifyCreate("DSA2048|NoHash", &verify);
67 HcfResult ret = HcfVerifyCreate("DSA2048|NoHash", &verify);
80 HcfResult ret = HcfVerifyCreate("DSA2048|NoHash", &verify);
93 HcfResult ret = HcfVerifyCreate("DSA2048|NoHash", &verify);
107 HcfResult ret = HcfVerifyCreate("DSA2048|NoHash", &verify);
Dcrypto_signature_exception_test.cpp50 HcfResult ret = EngineSignInit((HcfSignSpi *)&g_obj, nullptr, &sk);
66 HcfResult ret = EngineVerifyInit((HcfVerifySpi *)&g_obj, nullptr, &pk);
75 HcfResult ret = EngineSignUpdate((HcfSignSpi *)&g_obj, nullptr);
93 HcfResult ret = EngineVerifyUpdate((HcfVerifySpi *)&g_obj, nullptr);
111 HcfResult ret = EngineSign((HcfSignSpi *)&g_obj, nullptr, nullptr);
142 HcfResult ret = EngineSetSignSpecInt(nullptr, PSS_SALT_LEN_INT, 0);
149 HcfResult res = HcfSignCreate("DSA1024|SHA256", &sign);
169 HcfResult ret = EngineGetSignSpecInt(nullptr, PSS_SALT_LEN_INT, nullptr);
182 HcfResult ret = EngineGetSignSpecString(nullptr, PSS_SALT_LEN_INT, nullptr);
195 HcfResult ret = EngineSetVerifySpecInt(nullptr, PSS_SALT_LEN_INT, 0);
[all …]
Dcrypto_dsa_asy_key_generator_test.cpp46 static HcfResult GenerateDsa1024KeyPair(HcfKeyPair **returnKeyPair) in GenerateDsa1024KeyPair()
49 HcfResult ret = HcfAsyKeyGeneratorCreate("DSA1024", &generator); in GenerateDsa1024KeyPair()
63 static HcfResult GenerateDsa2048KeyPair(HcfKeyPair **returnKeyPair) in GenerateDsa2048KeyPair()
66 HcfResult ret = HcfAsyKeyGeneratorCreate("DSA2048", &generator); in GenerateDsa2048KeyPair()
80 static HcfResult GenerateDsa3072KeyPair(HcfKeyPair **returnKeyPair) in GenerateDsa3072KeyPair()
83 HcfResult ret = HcfAsyKeyGeneratorCreate("DSA3072", &generator); in GenerateDsa3072KeyPair()
133 static HcfResult GetKeyEncodedTest(HcfKeyPair *keyPair, HcfBlob *pkBlob, HcfBlob *skBlob) in GetKeyEncodedTest()
135 HcfResult ret = keyPair->pubKey->base.getEncoded(&(keyPair->pubKey->base), pkBlob); in GetKeyEncodedTest()
150 HcfResult ret = HcfAsyKeyGeneratorCreate("DSA1024", &generator);
161 HcfResult ret = HcfAsyKeyGeneratorCreate("DSA2048", &generator);
[all …]
Dcrypto_md_test.cpp88 HcfResult ret = HcfMdCreate("SHA1", nullptr);
96 HcfResult ret = HcfMdCreate("SHA1", &mdObj);
106 HcfResult ret = HcfMdCreate("SHA3", &mdObj);
115 HcfResult ret = HcfMdCreate(nullptr, &mdObj);
124 HcfResult ret = HcfMdCreate("SHA1", &mdObj);
138 HcfResult ret = HcfMdCreate("SHA1", &mdObj);
152 HcfResult ret = HcfMdCreate("SHA1", &mdObj);
168 HcfResult ret = HcfMdCreate("SHA1", &mdObj);
184 HcfResult ret = HcfMdCreate("SHA1", &mdObj);
205 HcfResult ret = HcfMdCreate("SHA256", &mdObj);
[all …]
/base/security/crypto_framework/frameworks/crypto_operation/
Dsignature.c31 typedef HcfResult (*HcfSignSpiCreateFunc)(HcfSignatureParams *, HcfSignSpi **);
32 typedef HcfResult (*HcfVerifySpiCreateFunc)(HcfSignatureParams *, HcfVerifySpi **);
151 static HcfResult ParseSignatureParams(const HcfParaConfig* config, void *params) in ParseSignatureParams()
156 HcfResult ret = HCF_SUCCESS; in ParseSignatureParams()
244 static HcfResult SetSignSpecInt(HcfSign *self, SignSpecItem item, int32_t saltLen) in SetSignSpecInt()
257 static HcfResult GetSignSpecString(HcfSign *self, SignSpecItem item, char **returnString) in GetSignSpecString()
270 static HcfResult GetSignSpecInt(HcfSign *self, SignSpecItem item, int32_t *returnInt) in GetSignSpecInt()
283 static HcfResult SignInit(HcfSign *self, HcfParamsSpec *params, HcfPriKey *privateKey) in SignInit()
296 static HcfResult SignUpdate(HcfSign *self, HcfBlob *data) in SignUpdate()
309 static HcfResult SignDoFinal(HcfSign *self, HcfBlob *data, HcfBlob *returnSignatureData) in SignDoFinal()
[all …]
/base/security/crypto_framework/plugin/openssl_plugin/crypto_operation/cipher/src/
Dcipher_sm4_openssl.c135 static HcfResult InitCipherData(enum HcfCryptoMode opMode, CipherData **cipherData) in InitCipherData()
137 HcfResult ret = HCF_ERR_MALLOC; in InitCipherData()
162 static HcfResult GetPaddingMode(HcfCipherSm4GeneratorSpiOpensslImpl* cipherImpl) in GetPaddingMode()
178 static HcfResult CheckParam(HcfCipherGeneratorSpi* self, enum HcfCryptoMode opMode, HcfKey* key) in CheckParam()
210 static HcfResult EngineCipherInit(HcfCipherGeneratorSpi* self, enum HcfCryptoMode opMode, in EngineCipherInit()
222 HcfResult ret = HCF_ERR_CRYPTO_OPERATION; in EngineCipherInit()
247 static HcfResult AllocateOutput(HcfBlob* input, HcfBlob* output) in AllocateOutput()
262 static HcfResult EngineUpdate(HcfCipherGeneratorSpi *self, HcfBlob *input, HcfBlob *output) in EngineUpdate()
279 HcfResult ret = HCF_ERR_CRYPTO_OPERATION; in EngineUpdate()
298 static HcfResult SM4DoFinal(CipherData* data, HcfBlob* input, HcfBlob* output) in SM4DoFinal()
[all …]

12345