This issue is caused by the default setting for allowed logon version in the 12 database.
Note that the SQLNET.ALLOWED_LOGON_VERSION parameter has been deprecated in 12c.
That parameter has been replaced by these:
The default setting for the new parameters is 11. Any client that attempts to connect must
be at version 11 or higher unless these parameters are explicitly set in the server side sqlnet.ora file.
Use the sqlnet.ora parameter SQLNET.ALLOWED_LOGON_VERSION to specify which authentication protocols are allowed by the client or database. This parameter defines the minimum Client Oracle version that is allowed to connect to the database. This parameter has been introduced in 10g which replaces the init.ora parameter DB_ALLOWED_LOGON_VERSION.