mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-01-27 09:31:20 +01:00
internal
This commit is contained in:
parent
6ac2717d8b
commit
cfdfd3a8af
@ -21,11 +21,11 @@ import org.matrix.android.sdk.internal.crypto.model.CryptoDeviceInfo
|
||||
import org.matrix.android.sdk.internal.util.JsonCanonicalizer
|
||||
import timber.log.Timber
|
||||
|
||||
fun CryptoDeviceInfo.canonicalSignable(): String {
|
||||
internal fun CryptoDeviceInfo.canonicalSignable(): String {
|
||||
return JsonCanonicalizer.getCanonicalJson(Map::class.java, signalableJSONDictionary())
|
||||
}
|
||||
|
||||
fun CryptoCrossSigningKey.canonicalSignable(): String {
|
||||
internal fun CryptoCrossSigningKey.canonicalSignable(): String {
|
||||
return JsonCanonicalizer.getCanonicalJson(Map::class.java, signalableJSONDictionary())
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ fun String.fromBase64(): ByteArray {
|
||||
/**
|
||||
* Decode the base 64. Return null in case of bad format. Should be used when parsing received data from external source
|
||||
*/
|
||||
fun String.fromBase64Safe(): ByteArray? {
|
||||
internal fun String.fromBase64Safe(): ByteArray? {
|
||||
return try {
|
||||
Base64.decode(this, Base64.DEFAULT)
|
||||
} catch (throwable: Throwable) {
|
||||
|
@ -63,7 +63,7 @@ data class CryptoCrossSigningKey(
|
||||
)
|
||||
}
|
||||
|
||||
data class Builder(
|
||||
internal data class Builder(
|
||||
val userId: String,
|
||||
val usage: KeyUsage,
|
||||
private var base64Pkey: String? = null,
|
||||
@ -97,7 +97,7 @@ data class CryptoCrossSigningKey(
|
||||
}
|
||||
}
|
||||
|
||||
enum class KeyUsage(val value: String) {
|
||||
internal enum class KeyUsage(val value: String) {
|
||||
MASTER("master"),
|
||||
SELF_SIGNING("self_signing"),
|
||||
USER_SIGNING("user_signing")
|
||||
|
@ -21,7 +21,7 @@ import org.matrix.olm.OlmPkEncryption
|
||||
import org.matrix.olm.OlmPkSigning
|
||||
import org.matrix.olm.OlmUtility
|
||||
|
||||
fun <T> withOlmEncryption(block: (OlmPkEncryption) -> T): T {
|
||||
internal fun <T> withOlmEncryption(block: (OlmPkEncryption) -> T): T {
|
||||
val olmPkEncryption = OlmPkEncryption()
|
||||
try {
|
||||
return block(olmPkEncryption)
|
||||
@ -30,7 +30,7 @@ fun <T> withOlmEncryption(block: (OlmPkEncryption) -> T): T {
|
||||
}
|
||||
}
|
||||
|
||||
fun <T> withOlmDecryption(block: (OlmPkDecryption) -> T): T {
|
||||
internal fun <T> withOlmDecryption(block: (OlmPkDecryption) -> T): T {
|
||||
val olmPkDecryption = OlmPkDecryption()
|
||||
try {
|
||||
return block(olmPkDecryption)
|
||||
@ -39,7 +39,7 @@ fun <T> withOlmDecryption(block: (OlmPkDecryption) -> T): T {
|
||||
}
|
||||
}
|
||||
|
||||
fun <T> withOlmSigning(block: (OlmPkSigning) -> T): T {
|
||||
internal fun <T> withOlmSigning(block: (OlmPkSigning) -> T): T {
|
||||
val olmPkSigning = OlmPkSigning()
|
||||
try {
|
||||
return block(olmPkSigning)
|
||||
@ -48,7 +48,7 @@ fun <T> withOlmSigning(block: (OlmPkSigning) -> T): T {
|
||||
}
|
||||
}
|
||||
|
||||
fun <T> withOlmUtility(block: (OlmUtility) -> T): T {
|
||||
internal fun <T> withOlmUtility(block: (OlmUtility) -> T): T {
|
||||
val olmUtility = OlmUtility()
|
||||
try {
|
||||
return block(olmUtility)
|
||||
|
Loading…
x
Reference in New Issue
Block a user