From 84c1a5097cb7faceafd0fae960fb0ba63adff377 Mon Sep 17 00:00:00 2001 From: "Nelson R. Perez" Date: Wed, 23 Nov 2016 09:36:05 -0500 Subject: [PATCH] Changing CRLF to LF --- .../com/luminiasoft/bitshares/BrainKey.java | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/src/main/java/com/luminiasoft/bitshares/BrainKey.java b/src/main/java/com/luminiasoft/bitshares/BrainKey.java index ac623f8..adbf41e 100644 --- a/src/main/java/com/luminiasoft/bitshares/BrainKey.java +++ b/src/main/java/com/luminiasoft/bitshares/BrainKey.java @@ -1,30 +1,30 @@ -package com.luminiasoft.bitshares; - -import org.bitcoinj.core.ECKey; - -import java.io.UnsupportedEncodingException; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; - -/** - * Created by nelson on 11/19/16. - */ -public class BrainKey { - - private ECKey mPrivateKey; - - public BrainKey(String words, int sequence) { - String encoded = String.format("%s %d", words, sequence); - try { - MessageDigest md = MessageDigest.getInstance("SHA-512"); - byte[] bytes = md.digest(encoded.getBytes("UTF-8")); - MessageDigest sha256 = MessageDigest.getInstance("SHA-256"); - byte[] result = sha256.digest(bytes); - mPrivateKey = ECKey.fromPrivate(result); - } catch (NoSuchAlgorithmException e) { - System.out.println("NoSuchAlgotithmException. Msg: " + e.getMessage()); - } catch (UnsupportedEncodingException e) { - System.out.println("UnsupportedEncodingException. Msg: " + e.getMessage()); - } - } -} +package com.luminiasoft.bitshares; + +import org.bitcoinj.core.ECKey; + +import java.io.UnsupportedEncodingException; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; + +/** + * Created by nelson on 11/19/16. + */ +public class BrainKey { + + private ECKey mPrivateKey; + + public BrainKey(String words, int sequence) { + String encoded = String.format("%s %d", words, sequence); + try { + MessageDigest md = MessageDigest.getInstance("SHA-512"); + byte[] bytes = md.digest(encoded.getBytes("UTF-8")); + MessageDigest sha256 = MessageDigest.getInstance("SHA-256"); + byte[] result = sha256.digest(bytes); + mPrivateKey = ECKey.fromPrivate(result); + } catch (NoSuchAlgorithmException e) { + System.out.println("NoSuchAlgotithmException. Msg: " + e.getMessage()); + } catch (UnsupportedEncodingException e) { + System.out.println("UnsupportedEncodingException. Msg: " + e.getMessage()); + } + } +}