All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.gs.api.accelrx.crypto.NoOpHashingProvider Maven / Gradle / Ivy

The newest version!
package com.gs.api.accelrx.crypto;

import com.gs.api.accelrx.HashingProvider;
import io.reactivex.rxjava3.core.Single;

import java.nio.charset.StandardCharsets;

public class NoOpHashingProvider implements HashingProvider {

    private NoOpHashingProvider() {
    }

    public static NoOpHashingProvider create() {
        return new NoOpHashingProvider();
    }

    @Override
    public Single hash(String message) {
        return Single.just(message);
    }

    @Override
    public Single hash(byte[] message) {
        return Single.just(message)
                .map(bytes -> new String(bytes, StandardCharsets.UTF_8));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy