In all cases in which an oath is required or authorized by law, it may be taken in any of the forms prescribed in this chapter. Every person swearing, affirming, or declaring in any such form, or any form authorized by law, shall be deemed to have been lawfully sworn and to be guilty of perjury for corruptly and falsely swearing, affirming, or declaring, in the same manner as if he or she had sworn by laying his or her hand on the Gospels and kissing them.