GOST3411_2012_512Digest.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
  5. namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests
  6. {
  7. public class Gost3411_2012_512Digest:Gost3411_2012Digest
  8. {
  9. private readonly static byte[] IV = {
  10. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  11. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  12. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  13. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  14. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  15. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  16. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  17. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
  18. };
  19. public override string AlgorithmName
  20. {
  21. get { return "GOST3411-2012-512"; }
  22. }
  23. public Gost3411_2012_512Digest():base(IV)
  24. {
  25. }
  26. public Gost3411_2012_512Digest(Gost3411_2012_512Digest other) : base(IV)
  27. {
  28. Reset(other);
  29. }
  30. public override int GetDigestSize()
  31. {
  32. return 64;
  33. }
  34. public override IMemoable Copy()
  35. {
  36. return new Gost3411_2012_512Digest(this);
  37. }
  38. }
  39. }
  40. #pragma warning restore
  41. #endif