Skip to content

Commit

Permalink
[REFACTOR] Signatures: reduce visibility of internal consts
Browse files Browse the repository at this point in the history
Signed-off-by: Olivier Mehani <olivier.mehani@learnosity.com>
  • Loading branch information
shtrom committed Apr 5, 2024
1 parent 595b8b1 commit 83e826a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions src/Services/Signatures/HashSignature.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@

class HashSignature implements SignatureInterface
{
public const ALGORITHM = 'sha256';

public const SIGNATURE_VERSION = '01';

public const CONSUMER_KEY_LENGTH = 16;
private const ALGORITHM = 'sha256';

private const CONSUMER_KEY_LENGTH = 16;

public const TIMESTAMP_KEY_LENGTH = 13;
private const TIMESTAMP_KEY_LENGTH = 13;

public const SIGNATURE_KEY_LENGTH = 64;
private const SIGNATURE_KEY_LENGTH = 64;

public const EXCEPTION_MESSAGE =
private const EXCEPTION_MESSAGE =
'The pre hash string for this signature type must contain the secret key';

/**
Expand Down
12 changes: 6 additions & 6 deletions src/Services/Signatures/HmacSignature.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@

class HmacSignature implements SignatureInterface
{
public const ALGORITHM = 'sha256';

public const SIGNATURE_VERSION = '02';

public const CONSUMER_KEY_LENGTH = 16;
private const ALGORITHM = 'sha256';

private const CONSUMER_KEY_LENGTH = 16;

public const TIMESTAMP_KEY_LENGTH = 13;
private const TIMESTAMP_KEY_LENGTH = 13;

public const SIGNATURE_KEY_LENGTH = 68;
private const SIGNATURE_KEY_LENGTH = 68;

public const EXCEPTION_MESSAGE =
private const EXCEPTION_MESSAGE =
'The pre hash string for this signature type must not contain the secret key';

/**
Expand Down

0 comments on commit 83e826a

Please sign in to comment.