/magstudentportal/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/magstudentportal/trunk

« back to all changes in this revision

Viewing changes to src/main/java/common/Utils.java

  • Committer: Gustav Hartvigsson
  • Date: 2017-08-28 13:28:34 UTC
  • mto: (15.1.10 magstudentportal-more-db)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: gustav.hartvigsson@gmail.com-20170828132834-xozqj3kmlqtwosc8
* Started work on design

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
package common;
2
2
 
 
3
import org.bouncycastle.jcajce.provider.digest.SHA3.*;
 
4
import org.bouncycastle.util.encoders.*;
 
5
 
 
6
 
3
7
public class
4
8
Utils {
5
9
  private Utils () {};
20
24
    StringBuilder sb = new StringBuilder ();
21
25
    sb.append (t).insert (b, s);
22
26
    
23
 
    return sb.toString();
 
27
    DigestSHA3 md = DigestSHA3 (2048);
 
28
    md.update (sb.toString().getBytes("UTF-8"));
 
29
 
 
30
    return Hex.toHexString (md.digits ());
24
31
  }
25
32
  
26
33
  /**