Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/SHA-256/Oberon-2/sha-256.oberon
Normal file
18
Task/SHA-256/Oberon-2/sha-256.oberon
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
MODULE SHA256;
|
||||
IMPORT
|
||||
Crypto:SHA256,
|
||||
Crypto:Utils,
|
||||
Strings,
|
||||
Out;
|
||||
VAR
|
||||
h: SHA256.Hash;
|
||||
str: ARRAY 128 OF CHAR;
|
||||
|
||||
BEGIN
|
||||
h := SHA256.NewHash();
|
||||
h.Initialize;
|
||||
str := "Rosetta code";
|
||||
h.Update(str,0,Strings.Length(str));
|
||||
h.GetHash(str,0);
|
||||
Out.String("SHA256: ");Utils.PrintHex(str,0,h.size);Out.Ln
|
||||
END SHA256.
|
||||
Loading…
Add table
Add a link
Reference in a new issue