Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dropped 'NonCryptographic' from crc class name #27458

Merged
merged 3 commits into from
Mar 10, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ public enum ClientSideEncryptionVersion
{
V1_0 = 1,
}
public partial class StorageCrc64NonCryptographicHashAlgorithm : System.IO.Hashing.NonCryptographicHashAlgorithm
public partial class StorageCrc64HashAlgorithm : System.IO.Hashing.NonCryptographicHashAlgorithm
{
internal StorageCrc64NonCryptographicHashAlgorithm() : base (default(int)) { }
internal StorageCrc64HashAlgorithm() : base (default(int)) { }
public override void Append(System.ReadOnlySpan<byte> source) { }
public static Azure.Storage.StorageCrc64NonCryptographicHashAlgorithm Create() { throw null; }
public static Azure.Storage.StorageCrc64HashAlgorithm Create() { throw null; }
protected override void GetCurrentHashCore(System.Span<byte> destination) { }
public override void Reset() { }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ internal class NonCryptographicHashAlgorithmHasher : IHasher
{
private const int _streamBufferSize = 4 * Constants.MB;

private readonly StorageCrc64NonCryptographicHashAlgorithm _nonCryptpgraphicHashAlgorithm;
private readonly StorageCrc64HashAlgorithm _nonCryptpgraphicHashAlgorithm;

public NonCryptographicHashAlgorithmHasher(StorageCrc64NonCryptographicHashAlgorithm nonCryptographicHashAlgorithm)
public NonCryptographicHashAlgorithmHasher(StorageCrc64HashAlgorithm nonCryptographicHashAlgorithm)
{
_nonCryptpgraphicHashAlgorithm = nonCryptographicHashAlgorithm;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@ namespace Azure.Storage
/// <summary>
/// Azure Storage CRC-64 implementation.
/// </summary>
public class StorageCrc64NonCryptographicHashAlgorithm : NonCryptographicHashAlgorithm
public class StorageCrc64HashAlgorithm : NonCryptographicHashAlgorithm
{
private ulong _uCRC;
private const int _hashSizeBytes = 8;

private StorageCrc64NonCryptographicHashAlgorithm(ulong uCrc)
private StorageCrc64HashAlgorithm(ulong uCrc)
: base(_hashSizeBytes)
{
_uCRC = uCrc;
}

/// <summary>
/// Creates a new instance of <see cref="StorageCrc64NonCryptographicHashAlgorithm"/>.
/// Creates a new instance of <see cref="StorageCrc64HashAlgorithm"/>.
/// </summary>
/// <returns></returns>
public static StorageCrc64NonCryptographicHashAlgorithm Create()
public static StorageCrc64HashAlgorithm Create()
{
return new StorageCrc64NonCryptographicHashAlgorithm(0UL);
return new StorageCrc64HashAlgorithm(0UL);
}

/// <inheritdoc/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void UpdateHashManualAppends()
// should produce same result every time regardless of randomness
byte[] ComputeHash()
{
var calculator = StorageCrc64NonCryptographicHashAlgorithm.Create();
var calculator = StorageCrc64HashAlgorithm.Create();
var position = 0;

do
Expand Down