IPWorks Encrypt 2020 C++ Edition

Questions / Feedback?

Algorithm Property

The algorithm used when signing.

Syntax

ANSI (Cross Platform)
int GetAlgorithm();
int SetAlgorithm(int iAlgorithm); Unicode (Windows) INT GetAlgorithm();
INT SetAlgorithm(INT iAlgorithm);

Possible Values

JWS_HS256(0), 
JWS_HS384(1),
JWS_HS512(2),
JWS_RS256(3),
JWS_RS384(4),
JWS_RS512(5),
JWS_ES256(6),
JWS_ES384(7),
JWS_ES512(8),
JWS_PS256(9),
JWS_PS384(10),
JWS_PS512(11),
JWS_NONE(12),
JWS_ES256K(13)
@property (nonatomic,readwrite,assign,getter=algorithm,setter=setAlgorithm:) int algorithm;
- (int)algorithm;
- (void)setAlgorithm:(int)newAlgorithm;

Possible Values

JWS_HS256(0), 
JWS_HS384(1),
JWS_HS512(2),
JWS_RS256(3),
JWS_RS384(4),
JWS_RS512(5),
JWS_ES256(6),
JWS_ES384(7),
JWS_ES512(8),
JWS_PS256(9),
JWS_PS384(10),
JWS_PS512(11),
JWS_NONE(12),
JWS_ES256K(13)
#define PID_JWS_ALGORITHM 1

IPWORKSENCRYPT_EXTERNAL void* IPWORKSENCRYPT_CALL IPWorksEncrypt_JWS_Get(void *lpObj, int propid, int arridx, int *lpcbVal, int64 *lpllVal);
IPWORKSENCRYPT_EXTERNAL int IPWORKSENCRYPT_CALL IPWorksEncrypt_JWS_Set(void *lpObj, int propid, int arridx, const void *val, int cbVal);

Default Value

0

Remarks

This property specifies the algorithm to use when signing.

When signing with an HMAC algorithm Key must be specified. When an RSA or ECDSA algorithm is selected Certificate must be set before calling Sign and Certificate must be set before calling Verify. The following values are supported:

AlgorithmDescriptionPrivate Key Location
0 (jwsHS256 - default) HMAC using SHA-256 Key
1 (jwsHS384) HMAC using SHA-384 Key
2 (jwsHS512) HMAC using SHA-512 Key
3 (jwsRS256) RSASSA-PKCS1-v1_5 using SHA-256 Certificate
4 (jwsRS384) RSASSA-PKCS1-v1_5 using SHA-384 Certificate
5 (jwsRS512) RSASSA-PKCS1-v1_5 using SHA-512 Certificate
6 (jwsPS256) RSASSA-PSS using SHA-256 and MGF1 with SHA-256 Certificate
7 (jwsPS384) RSASSA-PSS using SHA-384 and MGF1 with SHA-384 Certificate
8 (jwsPS512) RSASSA-PSS using SHA-512 and MGF1 with SHA-512 Certificate
9 (jwsES256) ECDSA using P-256 and SHA-256 Certificate
10 (jwsES384) ECDSA using P-384 and SHA-384 Certificate
11 (jwsES512) ECDSA using P-521 and SHA-512 Certificate
12 (jwsNone) None (unprotected) Not Applicable
13 (jwsES256K) ECDSA using secp256k1 curve and SHA-256 Certificate

Note: This setting is also applicable when StrictValidation is enabled before calling Verify.

Data Type

Integer

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Encrypt 2020 C++ Edition - Version 20.0 [Build 8155]