Currently I'm using the method strip_key($key) in order to remove -----BEGIN PGP PUBLIC KEY BLOCK----- and -----END PGP PUBLIC KEY BLOCK----- from the public key.
For now, it is done statically, by removing the first 3 lines and the last line from the key here.
The reason this function exists it is because when I used update_user_meta the function from WordPress it stripped the key from all of its \n and thus it could not be imported in the GPG.php library.
TODO: find a way to store the key while preserving all the \n.
Currently I'm using the method
strip_key($key)
in order to remove-----BEGIN PGP PUBLIC KEY BLOCK-----
and-----END PGP PUBLIC KEY BLOCK-----
from the public key.For now, it is done statically, by removing the first 3 lines and the last line from the key here.
The reason this function exists it is because when I used
update_user_meta
the function from WordPress it stripped the key from all of its\n
and thus it could not be imported in the GPG.php library.TODO: find a way to store the key while preserving all the
\n
.