-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Core: #604: Support for JWT-HMAC signature calculation
- Loading branch information
Showing
10 changed files
with
186 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
...oid/PowerAuthLibrary/src/main/java/io/getlime/security/powerauth/core/SigningDataKey.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Copyright 2024 Wultra s.r.o. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.getlime.security.powerauth.core; | ||
|
||
import androidx.annotation.IntDef; | ||
|
||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
|
||
import static io.getlime.security.powerauth.core.SigningDataKey.ECDSA_MASTER_SERVER_KEY; | ||
import static io.getlime.security.powerauth.core.SigningDataKey.ECDSA_PERSONALIZED_KEY; | ||
import static io.getlime.security.powerauth.core.SigningDataKey.HMAC_APPLICATION; | ||
import static io.getlime.security.powerauth.core.SigningDataKey.HMAC_ACTIVATION; | ||
|
||
/** | ||
* The <code>EciesEncryptorScope</code> defines how {@link EciesEncryptor} encryptor | ||
* is configured in {@link Session#getEciesEncryptor(int, SignatureUnlockKeys, byte[]) Session.getEciesEncryptor} method. | ||
*/ | ||
@Retention(RetentionPolicy.SOURCE) | ||
@IntDef({ECDSA_MASTER_SERVER_KEY, ECDSA_PERSONALIZED_KEY, HMAC_APPLICATION, HMAC_ACTIVATION}) | ||
public @interface SigningDataKey { | ||
/** | ||
* {@code KEY_SERVER_MASTER_PRIVATE} key was used for signature calculation. | ||
*/ | ||
int ECDSA_MASTER_SERVER_KEY = 0; | ||
/** | ||
* {@code KEY_SERVER_PRIVATE} key was used for signature calculation. | ||
*/ | ||
int ECDSA_PERSONALIZED_KEY = 1; | ||
/** | ||
* {@code APP_SECRET} key is used for HMAC-SHA256 signature calculation. | ||
*/ | ||
int HMAC_APPLICATION = 2; | ||
/** | ||
* {@code KEY_TRANSPORT} key is used for HMAC-SHA256 signature calculation. | ||
*/ | ||
int HMAC_ACTIVATION = 3; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters