HashAlgorithm Property
The hash algorithm used for hash computation.
Syntax
ANSI (Cross Platform) int GetHashAlgorithm();
int SetHashAlgorithm(int iHashAlgorithm); Unicode (Windows) INT GetHashAlgorithm();
INT SetHashAlgorithm(INT iHashAlgorithm);
Possible Values
EHA_SHA1(0),
EHA_SHA224(1),
EHA_SHA256(2),
EHA_SHA384(3),
EHA_SHA512(4),
EHA_MD2(5),
EHA_MD4(6),
EHA_MD5(7),
EHA_MD5SHA1(8),
EHA_RIPEMD160(9)
@property (nonatomic,readwrite,assign,getter=hashAlgorithm,setter=setHashAlgorithm:) int hashAlgorithm; - (int)hashAlgorithm; - (void)setHashAlgorithm:(int)newHashAlgorithm;
Possible Values
EHA_SHA1(0),
EHA_SHA224(1),
EHA_SHA256(2),
EHA_SHA384(3),
EHA_SHA512(4),
EHA_MD2(5),
EHA_MD4(6),
EHA_MD5(7),
EHA_MD5SHA1(8),
EHA_RIPEMD160(9)
#define PID_ECC_HASHALGORITHM 3 IPWORKSENCRYPT_EXTERNAL void* IPWORKSENCRYPT_CALL IPWorksEncrypt_ECC_Get(void *lpObj, int propid, int arridx, int *lpcbVal, int64 *lpllVal); IPWORKSENCRYPT_EXTERNAL int IPWORKSENCRYPT_CALL IPWorksEncrypt_ECC_Set(void *lpObj, int propid, int arridx, const void *val, int cbVal);
Default Value
2
Remarks
This property specifies the hash algorithm used for hash computation. This is only applicable when calling Sign or VerifySignature and KeyAlgorithm specifies a ECDSA key (secp256r1, secp384r1, or secp521r1. Possible values are:
0 (ehaSHA1) | SHA-1 |
1 (ehaSHA224) | SHA-224 |
2 (ehaSHA256 - default) | SHA-256 |
3 (ehaSHA384) | SHA-384 |
4 (ehaSHA512) | SHA-512 |
5 (ehaMD2) | MD2 |
6 (ehaMD4) | MD4 |
7 (ehaMD5) | MD5 |
8 (ehaMD5SHA1) | MD5SHA-1 |
9 (ehaRIPEMD160) | RIPEMD-160 |
When KeyAlgorithm specified an EdDSA key this setting is not applicable as the hash algorithm is defined by the specification as SHA-512 for ed25519 and SHAKE-256 for ed448.
Data Type
Integer