rok-core 0.6.0

Core primitives for the rok ecosystem — errors, crypto, i18n, config, DI, and more
Documentation
1
2
3
4
5
6
7
use crate::crypto::hash::HashError;

pub(crate) trait HashDriver: Send + Sync + 'static {
    fn hash(&self, password: &str) -> Result<String, HashError>;
    fn verify(&self, password: &str, hash: &str) -> Result<bool, HashError>;
    fn needs_rehash(&self, hash: &str) -> bool;
}