File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
sdk/src/main/java/io/opentdf/platform/sdk Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -336,6 +336,7 @@ jobs:
336336 needs : platform-integration
337337 uses : opentdf/tests/.github/workflows/xtest.yml@main
338338 with :
339+ focus-sdk : java
339340 java-ref : ${{ github.ref }}
340341
341342 ci :
Original file line number Diff line number Diff line change 1313import io .opentdf .platform .sdk .nanotdf .ECKeyPair ;
1414import org .apache .commons .codec .DecoderException ;
1515import org .apache .commons .codec .binary .Hex ;
16+ import org .bouncycastle .crypto .digests .SHA256Digest ;
1617import org .bouncycastle .jce .interfaces .ECPublicKey ;
1718import org .slf4j .Logger ;
1819import org .slf4j .LoggerFactory ;
3738 */
3839public class TDF {
3940
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 ();
4154 private static final String EMPTY_SPLIT_ID = "" ;
4255 private static final String TDF_VERSION = "4.3.0" ;
4356 private static final String KEY_ACCESS_SECHMA_VERSION = "1.0" ;
You can’t perform that action at this time.
0 commit comments