<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>tron on adolsai's echo</title><link>https://adolsai.com/tag/tron/</link><description>Recent content in tron on adolsai's echo</description><generator>Hugo</generator><language>zh-CN</language><lastBuildDate>Thu, 27 Dec 2018 21:47:14 +0800</lastBuildDate><atom:link href="https://adolsai.com/tag/tron/index.xml" rel="self" type="application/rss+xml"/><item><title>TRON iOS Objective-C address generate</title><link>https://adolsai.com/archives/TRON-iOS-Objective-C-address-generate.html</link><pubDate>Wed, 26 Dec 2018 14:55:00 +0800</pubDate><guid>https://adolsai.com/archives/TRON-iOS-Objective-C-address-generate.html</guid><description>&lt;p&gt;Related Document: &lt;a href="https://github.com/tronprotocol/Documentation/blob/master/TRX_CN/Tron-overview.md"&gt;TRON公链概览&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;引用文件来源于这里: &lt;a href="https://github.com/MountainJ/PocketEOS-IOS"&gt;PocketEOS-IOS&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="secrect-key-generation"&gt;Secrect Key Generation:&lt;/h2&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;#import &amp;lt;Security/Security.h&amp;gt;&#10;#import &amp;#34;NSObject+Extension.h&amp;#34;&#10;#import &amp;#34;sha3.h&amp;#34;&#10;&#10;#include &amp;#34;libbase58.h&amp;#34;&#10;#include &amp;#34;sha2.h&amp;#34;&#10;#include &amp;#34;uECC.h&amp;#34;&#10;&#10;...&#10;&#10;int length = 32;&#10;uint8_t randomBytes[length];&#10;int randomResult = SecRandomCopyBytes(kSecRandomDefault, length, randomBytes);&#10;if(randomResult == 0) {&#10; NSMutableString *randomSecrect =&#10; [[NSMutableString alloc] initWithCapacity:length * 2];&#10; &#10; for(NSInteger index = 0; index &amp;lt; length; index++){&#10; [randomSecrect appendFormat:@&amp;#34;%02x&amp;#34;, randomBytes[index]];&#10; }&#10; &#10;}&#10;&lt;/code&gt;&lt;/pre&gt;</description></item></channel></rss>