File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed
java/network/loki/messenger/libsession_util/util Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -107,4 +107,33 @@ Java_network_loki_messenger_libsession_1util_util_BlindKeyAPI_sessionIdMatchesBl
107
107
}, [](const char *) -> jboolean {
108
108
return false ;
109
109
});
110
+ }
111
+
112
+ extern " C"
113
+ JNIEXPORT jobject JNICALL
114
+ Java_network_loki_messenger_libsession_1util_util_BlindKeyAPI_blind15Ids (JNIEnv *env, jobject thiz,
115
+ jstring session_id,
116
+ jstring server_pub_key) {
117
+ return jni_utils::run_catching_cxx_exception_or_throws<jobject>(env, [=]() -> jobject {
118
+ return jni_utils::jstring_list_from_collection (
119
+ env,
120
+ session::blind15_id (
121
+ jni_utils::JavaStringRef (env, session_id).view (),
122
+ jni_utils::JavaStringRef (env, server_pub_key).view ()
123
+ )
124
+ );
125
+ });
126
+ }
127
+
128
+ extern " C"
129
+ JNIEXPORT jstring JNICALL
130
+ Java_network_loki_messenger_libsession_1util_util_BlindKeyAPI_blind25Id (JNIEnv *env, jobject thiz,
131
+ jstring session_id,
132
+ jstring server_pub_key) {
133
+ return jni_utils::run_catching_cxx_exception_or_throws<jstring>(env, [=]() -> jstring {
134
+ return util::jstringFromOptional (env, session::blind25_id (
135
+ jni_utils::JavaStringRef (env, session_id).view (),
136
+ jni_utils::JavaStringRef (env, server_pub_key).view ()
137
+ ));
138
+ });
110
139
}
Original file line number Diff line number Diff line change @@ -44,6 +44,16 @@ object BlindKeyAPI : LibSessionUtilCApi() {
44
44
message : ByteArray ,
45
45
): ByteArray
46
46
47
+ external fun blind15Ids (
48
+ sessionId : String ,
49
+ serverPubKey : String ,
50
+ ): List <String >
51
+
52
+ external fun blind25Id (
53
+ sessionId : String ,
54
+ serverPubKey : String ,
55
+ ): String
56
+
47
57
/* *
48
58
* Takes in a standard sessionId and returns a flag indicating whether it matches the given
49
59
* blindedId for a given serverPubKey
You can’t perform that action at this time.
0 commit comments