This repository has been archived by the owner on Aug 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move format into enum package and add keytype enum
- Loading branch information
1 parent
45f8c0f
commit f448fa8
Showing
2 changed files
with
56 additions
and
1 deletion.
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
55 changes: 55 additions & 0 deletions
55
kmp-advcrypto/src/commonMain/kotlin/io/karma/advcrypto/keys/enum/KeyType.kt
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,55 @@ | ||
/* | ||
* Copyright (c) 2024 Cach30verfl0w | ||
* | ||
* 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.karma.advcrypto.keys.enum | ||
|
||
/** | ||
* This enum represents all types of keys. These types are available though the key interface and | ||
* it's implementations. | ||
* | ||
* @author Cedric Hammes | ||
* @since 14/06/2024 | ||
*/ | ||
enum class KeyType { | ||
|
||
/** | ||
* This enum value represents a private key type. Private keys are used in signature and | ||
* asymmetric encryption algorithms as a secret hold by the issuer of the key. | ||
* | ||
* @author Cedric Hammes | ||
* @since 14/06/2024 | ||
*/ | ||
PRIVATE, | ||
|
||
/** | ||
* This enum value represents a public key type. Public keys are used in signature and | ||
* asymmetric encryption algorithms as public value hold by the issuer and any peer. | ||
* | ||
* @author Cedric Hammes | ||
* @since 14/06/2024 | ||
*/ | ||
PUBLIC, | ||
|
||
/** | ||
* This enum value represents a secret key type. Secret keys are used in symmetric encryption | ||
* algorithms as a secret hold by both issuer and peer. | ||
* | ||
* @author Cedric Hammes | ||
* @since 14/06/2024 | ||
*/ | ||
SECRET | ||
|
||
} |