package com.casic.br.utils

import com.pengxh.kt.lite.utils.SaveKeyValues

object AuthenticationHelper {

    fun savePublicKey(key: String) {
        SaveKeyValues.putValue("keyString", key)
    }

    val publicKey: String?
        get() = SaveKeyValues.getValue("keyString", "") as String?

    fun saveToken(token: String?) {
        SaveKeyValues.putValue("token", token!!)
    }

    val token: String?
        get() = SaveKeyValues.getValue("token", "") as String?

    fun removeToken() {
        SaveKeyValues.removeKey("token")
    }
}