<div><div>But, but, the docs imply that this is the syntax for a function that returns an array of bytes.</div><div><br></div><div>fpc ios7crypt.pas</div><div>ios7crypt.pas(3,25) Error: Type identifier expected</div><div>ios7crypt.pas(3,25) Fatal: Syntax error, ";" expected but "ARRAY" found</div>
<div>Fatal: Compilation aborted</div></div><div><br></div>$ cat ios7crypt.pas<div><div>program IOS7Crypt;</div><div><br></div><div>function XlatPrime () : array of byte;</div><div>begin</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>XlatPrime := (</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>$64, $73, $66, $64, $3b, $6b, $66, $6f,</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>$41, $2c, $2e, $69, $79, $65, $77, $72,</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>$6b, $6c, $64, $4a, $4b, $44, $48, $53,</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>$55, $42, $73, $67, $76, $63, $61, $36,</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>$39, $38, $33, $34, $6e, $63, $78, $76,</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>$39, $38, $37, $33, $32, $35, $34, $6b,</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>$3b, $66, $67, $38, $37</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>);</div><div>end;</div><div><br></div><div>function Encrypt (hash : string) : string;</div>
<div>begin</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Encrypt := 'abc';</div><div>end;</div><div><br></div><div>function Decrypt (hash : string) : string;</div><div>begin</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Decrypt := 'abc';</div>
<div>end;</div><div><br></div><div>var</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>password : string;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>hash : string;</div>
<div>
begin</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>password := 'abc';</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>hash := Encrypt(password);</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>password := Decrypt(hash);</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>write('Password: ');</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>writeln(password);</div><div>end.</div><div><br></div>Cheers,<div><br></div><div>Andrew Pennebaker</div><div><a href="http://www.yellosoft.us" target="_blank">www.yellosoft.us</a></div>
</div>