File tree 2 files changed +15
-1
lines changed
sdk/src/main/java/io/opentdf/platform/sdk
2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -336,6 +336,7 @@ jobs:
336
336
needs : platform-integration
337
337
uses : opentdf/tests/.github/workflows/xtest.yml@main
338
338
with :
339
+ focus-sdk : java
339
340
java-ref : ${{ github.ref }}
340
341
341
342
ci :
Original file line number Diff line number Diff line change 13
13
import io .opentdf .platform .sdk .nanotdf .ECKeyPair ;
14
14
import org .apache .commons .codec .DecoderException ;
15
15
import org .apache .commons .codec .binary .Hex ;
16
+ import org .bouncycastle .crypto .digests .SHA256Digest ;
16
17
import org .bouncycastle .jce .interfaces .ECPublicKey ;
17
18
import org .slf4j .Logger ;
18
19
import org .slf4j .LoggerFactory ;
37
38
*/
38
39
public class TDF {
39
40
40
- public static final byte [] GLOBAL_KEY_SALT = null ;
41
+ private static byte [] tdfECKeySaltCompute () {
42
+ byte [] salt ;
43
+ try {
44
+ MessageDigest digest = MessageDigest .getInstance ("SHA-256" );
45
+ digest .update ("TDF" .getBytes ());
46
+ salt = digest .digest ();
47
+ } catch (NoSuchAlgorithmException e ) {
48
+ throw new RuntimeException ("failed to compute salt for TDF" , e );
49
+ }
50
+ return salt ;
51
+ }
52
+
53
+ public static final byte [] GLOBAL_KEY_SALT = tdfECKeySaltCompute ();
41
54
private static final String EMPTY_SPLIT_ID = "" ;
42
55
private static final String TDF_VERSION = "4.3.0" ;
43
56
private static final String KEY_ACCESS_SECHMA_VERSION = "1.0" ;
You can’t perform that action at this time.
0 commit comments