Made message signing in Cryptography use SHA512 as the message content for... #1
1 changed files with 49 additions and 49 deletions
|
@ -1,9 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Socialbox\Classes;
|
namespace Socialbox\Classes;
|
||||||
|
|
||||||
class Validator
|
class Validator
|
||||||
{
|
{
|
||||||
private const string PEER_ADDRESS_PATTERN = "/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/";
|
private const string PEER_ADDRESS_PATTERN = "/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/";
|
||||||
private const string USERNAME_PATTERN = "/^[a-zA-Z0-9_]+$/";
|
private const string USERNAME_PATTERN = "/^[a-zA-Z0-9_]+$/";
|
||||||
|
|
||||||
|
@ -55,4 +55,4 @@ class Validator
|
||||||
{
|
{
|
||||||
return preg_match("/^\+[0-9]{1,15}$/", $phoneNumber) === 1;
|
return preg_match("/^\+[0-9]{1,15}$/", $phoneNumber) === 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue