This repository was archived by the owner on Feb 28, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +20
-0
lines changed
Expand file tree Collapse file tree 5 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 1212 */
1313class FieldLevelEncryption {
1414
15+ private function __construct () {
16+ // This class can't be instantiated
17+ }
18+
1519 /**
1620 * Encrypt parts of a JSON payload using the given parameters and configuration.
1721 * @param $payload A JSON string
Original file line number Diff line number Diff line change 1313 */
1414class FieldLevelEncryptionConfigBuilder {
1515
16+ private function __construct () {
17+ // This class can't be instantiated
18+ }
19+
1620 private $ encryptionCertificate ;
1721 private $ encryptionCertificateFingerprint ;
1822 private $ encryptionKeyFingerprint ;
Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ class JsonPath {
1616 const FIRST_CHILD_KEY = "/(?:\[')([^\[\]]*)(?:'\])/ " ; // Returns "obj1" for "$['obj1']['obj2']"
1717 const FIRST_TOKEN_IN_PATH = "/(\['[^\[\]]*'\])/ " ; // Returns "['obj1']" for "$['obj1']['obj2']"
1818
19+ private function __construct () {
20+ // This class can't be instantiated
21+ }
22+
1923 /**
2024 * Convert the given JSON path to the following form: $['path']['to']['object'].
2125 * @throws \InvalidArgumentException
Original file line number Diff line number Diff line change 55
66class EncodingUtils {
77
8+ private function __construct () {
9+ // This class can't be instantiated
10+ }
11+
812 static function encodeBytes ($ bytes , $ encoding ) {
913 return $ encoding === FieldValueEncoding::HEX ? self ::hexEncode ($ bytes ) : base64_encode ($ bytes );
1014 }
Original file line number Diff line number Diff line change @@ -14,6 +14,10 @@ class EncryptionUtils {
1414 const PKCS_8_PEM_HEADER = '-----BEGIN PRIVATE KEY----- ' ;
1515 const PKCS_8_PEM_FOOTER = '-----END PRIVATE KEY----- ' ;
1616
17+ private function __construct () {
18+ // This class can't be instantiated
19+ }
20+
1721 /**
1822 * Create an X.509 resource from the certificate data at the given file path.
1923 * @throws \InvalidArgumentException
You can’t perform that action at this time.
0 commit comments