13
0
geforkt von Mirrors/Velocity

Generic MBEDTLS_ROOT

Dieser Commit ist enthalten in:
Andrew Steinborn 2018-12-24 12:18:36 -05:00
Ursprung 1c2235af5a
Commit e690d88fa0
3 geänderte Dateien mit 6 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -1,7 +1,7 @@
#!/bin/bash
# Modify as you need.
MBEDTLS_ROOT=mbedtls-2.12.0
MBEDTLS_ROOT=mbedtls
CFLAGS="-O3 -I$JAVA_HOME/include/ -I$JAVA_HOME/include/linux/ -fPIC -shared"
gcc $CFLAGS -lz src/main/c/jni_util.c src/main/c/jni_zlib_deflate.c src/main/c/jni_zlib_inflate.c \
-o src/main/resources/linux_x64/velocity-compress.so

Datei anzeigen

@ -1,7 +1,7 @@
#!/bin/bash
# Modify as you need.
MBEDTLS_ROOT=mbedtls-2.12.0
MBEDTLS_ROOT=mbedtls
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home
CFLAGS="-O3 -I$JAVA_HOME/include/ -I$JAVA_HOME/include/darwin/ -fPIC -shared"

Datei anzeigen

@ -1,8 +1,10 @@
package com.velocitypowered.natives.encryption;
public class MbedtlsAesImpl {
import java.security.GeneralSecurityException;
native long init(byte[] key);
class MbedtlsAesImpl {
native long init(byte[] key) throws GeneralSecurityException;
native void process(long ctx, long sourceAddress, int sourceLength, long destinationAddress,
boolean encrypt);