-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: document the latest development (#115)
- Loading branch information
1 parent
854fc70
commit d435148
Showing
9 changed files
with
153 additions
and
0 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
25 changes: 25 additions & 0 deletions
25
...onMain/kotlin/io/iohk/atala/prism/walletsdk/domain/models/keyManagement/KeyRestoration.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 |
---|---|---|
@@ -1,12 +1,37 @@ | ||
package io.iohk.atala.prism.walletsdk.domain.models.keyManagement | ||
|
||
/** | ||
* This interface defines the functionality to verify and restore cryptographic keys | ||
*/ | ||
interface KeyRestoration { | ||
|
||
/** | ||
* Determines if the input data corresponds to a private key | ||
* @param identifier a string that identifies the key | ||
* @param data a ByteArray that represents the raw data | ||
* @return a boolean value that tells if the identifier represents the private key | ||
*/ | ||
fun isPrivateKeyData(identifier: String, data: ByteArray): Boolean | ||
|
||
/** | ||
* Determines if the input data corresponds to a public key | ||
* @param identifier a string that identifies the key | ||
* @param data a ByteArray that represents the raw data | ||
* @return a boolean value that tells if the identifier represents the public key | ||
*/ | ||
fun isPublicKeyData(identifier: String, data: ByteArray): Boolean | ||
|
||
/** | ||
* A method to restore a private key from a StorableKey | ||
* @param key a StorableKey instance | ||
* @return a PrivateKey | ||
*/ | ||
fun restorePrivateKey(key: StorableKey): PrivateKey | ||
|
||
/** | ||
* A method to restore a public key from a StorableKey | ||
* @param key a StorableKey instance | ||
* @return a PublicKey | ||
*/ | ||
fun restorePublicKey(key: StorableKey): PublicKey | ||
} |
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
9 changes: 9 additions & 0 deletions
9
...ommonMain/kotlin/io/iohk/atala/prism/walletsdk/domain/models/keyManagement/SignableKey.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 |
---|---|---|
@@ -1,5 +1,14 @@ | ||
package io.iohk.atala.prism.walletsdk.domain.models.keyManagement | ||
|
||
/** | ||
* This interface defines the functionality of a signable key. | ||
*/ | ||
interface SignableKey { | ||
|
||
/** | ||
* Method to sign a message using a key. | ||
* @param message the ByteArray to be signed | ||
* @return the signed message as a ByteArray | ||
*/ | ||
fun sign(message: ByteArray): ByteArray | ||
} |
3 changes: 3 additions & 0 deletions
3
...ommonMain/kotlin/io/iohk/atala/prism/walletsdk/domain/models/keyManagement/StorableKey.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
9 changes: 9 additions & 0 deletions
9
...monMain/kotlin/io/iohk/atala/prism/walletsdk/domain/models/keyManagement/VerifiableKey.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 |
---|---|---|
@@ -1,5 +1,14 @@ | ||
package io.iohk.atala.prism.walletsdk.domain.models.keyManagement | ||
|
||
/** | ||
* This interface defines the functionality of a verifiable key. | ||
*/ | ||
interface VerifiableKey { | ||
/** | ||
* Method to verify a message with a signature. | ||
* @param message in ByteArray | ||
* @param signature in byteArray | ||
* @return a boolean which tell us if message and signature match | ||
*/ | ||
fun verify(message: ByteArray, signature: ByteArray): Boolean | ||
} |