package Ġio . pro venance . hd wallet . ec . util Ċ Ċ import Ġjava . security . KeyPair Ċ import Ġjava . security . KeyPair Generator Ċ import Ġjava . security . PrivateKey Ċ import Ġjava . security . PublicKey Ċ import Ġjava . security . Secure Random Ċ import Ġorg . bouncycastle . j ce . provider . Bo unc y Castle Provider Ċ Ċ private Ġval Ġseed : ĠByteArray Ġ= Ġbyte ArrayOf ( 0 x DE . to Byte (), Ġ 0 x AD . to Byte (), Ġ 0 x BE . to Byte (), Ġ 0 xEF . to Byte ()) Ċ Ċ private Ġval Ġsee ded Random Ġ= ĠSecure Random ( seed ) Ċ Ċ fun Ġcreate EC KeyPair ( key Size : ĠInt Ġ= Ġ 2 5 6 , Ġrandom : ĠSecure Random Ġ= Ġsee ded Random ): ĠPair < PublicKey , ĠPrivate Key > Ġ{ ĊĠĠĠ Ġval Ġkey Gen Ġ= ĠKey Pair Generator . getInstance (" EC ", ĠBo unc y Castle Provider . PROVIDER _ NAME ) ĊĠĠĠ Ġkey Gen . initialize ( key Size , Ġrandom ) ĊĠĠĠ Ġval Ġpair : ĠKey Pair Ġ= Ġkey Gen . generate KeyPair () ĊĠĠĠ Ġreturn ĠPair ( pair . public , Ġpair . private ) Ċ }