raed667 / GPG-2FA-WordPress

GPG 2FA for WordPress users
1 stars 0 forks source link

Remove the need to 'strip_key' #1

Closed raed667 closed 1 year ago

raed667 commented 8 years ago

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.