void initSpake(SSLParametersImpl parameters) throws SSLException {
        Spake2PlusKeyManager spakeKeyManager = parameters.getSpake2PlusKeyManager();
        byte[] context = spakeKeyManager.getContext();
        byte[] idProverArray = spakeKeyManager.getIdProver();
        byte[] idVerifierArray = spakeKeyManager.getIdVerifier();
        byte[] pwArray = spakeKeyManager.getPassword();
        boolean isClient = spakeKeyManager.isClient();
        int handshakeLimit = spakeKeyManager.getHandshakeLimit();
        lock.writeLock().lock();
        try {
            if (isValid()) {
                NativeCrypto.SSL_CTX_set_spake_credential(context, pwArray, idProverArray,
                        idVerifierArray, isClient, handshakeLimit, sslCtxNativePointer, this);
            }
        } finally {
            lock.writeLock().unlock();
        }
    }
This is provided for API-compatibility only, not intended for use. No guarantees are
made WRT performance or the validity of the returned session.
common/src/main/java/org/conscrypt/AbstractSessionContext.java