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
// A Simple Encryption/Decryption Algorithm | |
object CCED01_ASCII { | |
// text to encrypt | |
// rotationStep is a key for encryption | |
fun encrypt(text: String, rotationStep:Int): String { | |
val startIndex = 32 // Start of the printable characters of the ASCII table | |
val endIndex = 126 // End of the printable characters of the ASCII table | |
val length = endIndex - startIndex |
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
import com.hfh.wellbe.smartwatch.utils.messagingEncryption.CCED01_v2 | |
import java.lang.IllegalStateException | |
import kotlin.math.absoluteValue | |
// A Simple Encryption/Decryption Algorithm | |
object CCED01_ASCII { | |
fun encode(text: String): String { | |
val startIndex = 32 |
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
package com.hfh.wellbe.smartwatch.utils.messagingEncryption | |
import java.lang.IllegalStateException | |
// A Simple Encryption/Decryption Algorithm for Numbers | |
object CCED01_v2 { | |
fun encode(text: String): String { | |
val rotatingSymbols = mutableListOf<Char>() |
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
import java.lang.IllegalStateException | |
// A Simple Encryption/Decryption Algorithm | |
object CCED01_ASCII { | |
fun encode(text: String,rotationStep:Int): String { | |
val step = rotationStep%255 | |
// Holds final encoded symbols. | |
val encoded = StringBuilder() |
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
{ | |
"customer": { | |
"firstName": "Hans", | |
"surname": "Tester", | |
"street": "Hausstr.", | |
"nameAtBirth": "Tester", | |
"houseNumber": "32", | |
"postalCode": "55555", | |
"placeOfResidence": "Berlin", | |
"nationality": "D", |
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
import kotlin.math.pow | |
/** | |
* | |
* @param binary can contain only 1 and 0 digits, for example, 1010011, otherwise, it will throw IllegalArgumentException. | |
* @param groupLength defines each group length that a given binary number would be divided,by default it is 5. | |
* | |
* */ | |
object BinaryConverter { |
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
package com.hfh.wellbe.smartwatch.utils.messagingEncryption | |
import java.lang.IllegalStateException | |
// A Simple Encryption/Decryption Algorithm for Numbers | |
object CCED01 { | |
private val numberToSymbols = mapOf( | |
0 to '@', | |
1 to '#', |
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
import java.lang.IllegalStateException | |
// A Simple Encryption/Decryption Algorithm for Numbers | |
object CCED01 { | |
private val numberToSymbols = mapOf( | |
0 to '@', | |
1 to '#', | |
2 to '$', | |
3 to '%', |
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
{ | |
"customer": { | |
"firstName": "Hans", | |
"surname": "Tester", | |
"street": "Hausstr.", | |
"nameAtBirth": "Tester", | |
"houseNumber": "32", | |
"postalCode": "55555", | |
"placeOfResidence": "Berlin", | |
"nationality": "D", |
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
package com.hfh.wellbe.smartwatch.enums | |
enum class AssistantActionControlType(val value: Int) { | |
None(0), | |
AnswerCall(1), | |
Cancel(2), | |
DeclineCall(3), | |
Diagnostic(4), | |
ErrorOccurred(5), | |
HangUp(6), |