Data update
This commit is contained in:
parent
8e4e15fa56
commit
72eb4943cb
1853 changed files with 35514 additions and 9441 deletions
19
Task/SHA-256/FutureBasic/sha-256.basic
Normal file
19
Task/SHA-256/FutureBasic/sha-256.basic
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
include "NSLog.incl"
|
||||
include "CommonCrypto/CommonCrypto.incl"
|
||||
|
||||
void local fn DoIt
|
||||
CFStringRef msg = @"Rosetta code"
|
||||
ptr rc = fn StringUTF8String( msg )
|
||||
unsigned char buf(32)
|
||||
fn CC_SHA256( rc, fn strlen(rc), @buf(0) )
|
||||
CFMutableStringRef res = fn MutableStringWithCapacity(CC_SHA256_DIGEST_LENGTH)
|
||||
for int i = 0 to CC_SHA256_DIGEST_LENGTH - 1
|
||||
MutableStringAppendFormat( res, @"%02x", buf(i) )
|
||||
next
|
||||
NSLog(@"Input:\n%@\n",msg)
|
||||
NSLog(@"Output:\n%@", res)
|
||||
end fn
|
||||
|
||||
fn DoIt
|
||||
|
||||
HandleEvents
|
||||
Loading…
Add table
Add a link
Reference in a new issue