diff options
Diffstat (limited to 'doc/classes/HMACContext.xml')
-rw-r--r-- | doc/classes/HMACContext.xml | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/doc/classes/HMACContext.xml b/doc/classes/HMACContext.xml index d033738e52..706ee30963 100644 --- a/doc/classes/HMACContext.xml +++ b/doc/classes/HMACContext.xml @@ -32,22 +32,22 @@ public class CryptoNode : Node { private HMACContext ctx = new HMACContext(); + public override void _Ready() { - PackedByteArray key = String("supersecret").to_utf8(); - Error err = ctx.Start(HashingContext.HASH_SHA256, key); - GD.Assert(err == OK); - PackedByteArray msg1 = String("this is ").to_utf8(); - PackedByteArray msg2 = String("super duper secret").to_utf8(); + byte[] key = "supersecret".ToUTF8(); + Error err = ctx.Start(HashingContext.HashType.Sha256, key); + Debug.Assert(err == Error.Ok); + byte[] msg1 = "this is ".ToUTF8(); + byte[] msg2 = "super duper secret".ToUTF8(); err = ctx.Update(msg1); - GD.Assert(err == OK); + Debug.Assert(err == Error.Ok); err = ctx.Update(msg2); - GD.Assert(err == OK); - PackedByteArray hmac = ctx.Finish(); + Debug.Assert(err == Error.Ok); + byte[] hmac = ctx.Finish(); GD.Print(hmac.HexEncode()); } } - [/csharp] [/codeblocks] </description> @@ -72,7 +72,7 @@ <return type="int" enum="Error" /> <param index="0" name="data" type="PackedByteArray" /> <description> - Updates the message to be HMACed. This can be called multiple times before [method finish] is called to append [code]data[/code] to the message, but cannot be called until [method start] has been called. + Updates the message to be HMACed. This can be called multiple times before [method finish] is called to append [param data] to the message, but cannot be called until [method start] has been called. </description> </method> </methods> |